Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
-
Mac OS X 10.3.2, java 1.4.2
Using CVS HEAD from 4/16/2004
Description
Sometimes when I have a problem in a class, that problem is hidden from me and I see other problems. This makes it very difficult to track down the original problem.
For example:
class HiddenProblem {
static dosomething() {
f = new File("/tmp")
f.eachFile
}
}
Now go into groovysh and enter:
1> HiddenProblem.dosomething()
2) go
Cannot invoke method: dosomething on null object
If I change the static to nonstatic, then do this:
1> h = new HiddenProblem()
2> h.dosomething()
3> go
No such class: HiddenProblem in constructor call for class: CommandLine1. At [1:5] CommandLine1.groovy
The real bug is that the File class is unknown, but this error seems to be lost. When the object graph gets more complicated, like classes inheriting from other classes, then the real problem is a nightmare to find.