My test problems with DynamicJava went away -- I suspect it was some
oddity with using the official jsr14 v2.5 and JDK 1.4. My changes are
now committed to CVS. It was a very simple fix to add the argument
types to the error message when a method lookup fails. For example,
this call:
System.exit("blah");
now provides this error message:
Error: No 'exit' method in 'java.lang.System' with arguments:
(java.lang.String)
Instead of the old, misleading message:
Error: No 'exit' method in 'java.lang.System'
The new message still isn't perfect, since Java method lookup doesn't
require an exact match. Something like "No '%0' method in '%1' matches
arguments: (%2)" would be more precise, if we could trust the user to
understand "matches" in the context of the Java type system. I went
with the more general wording because I think Java novices would be
less likely to misinterpret it. You can play with your own message
strings by changing the
dynamicjava/interpreter/resources/messages.properties file. The old
"no.such.method" string is still in use by some special cases, and my
new message is called "no.such.method.with.args".
P.S. It appears that the ant script also committed my build.xml and
build-common.xml. I modified them so that the "jar" target works
correctly, building a "dynamicjava.jar" instead of "drjava.jar", and to
print only deprecation and unchecked operation warnings (and not all
the serialization stuff).
--
Peter
On Mar 31, 2004, at 11:46 PM, Neal Horowitz wrote:
> Peter -- what changes exactly did you make and what problems are you
> having?
> There shouldn't be any trouble with the unit tests... Maybe James can
> tell you
> more?
|