From: Shankar Unni <shankar@co...> - 2003-06-12 01:37:51
With the latest CVS tip (1.3a3), I can't bring up the desktop. Several =
PROBLEM 1: In Name.java, when looking up builtin scripts, it does a
getResourceOnStream of "commands/" + the command name, instead of
"/bsh/commands/" + the command name.
PROBLEM 2: Anyway, after I fix this, it dies while loading desktop, with =
IllegalArgumentException. The precise statement that dies is:
It's trying to call addActionListener with an XThis object, which
Reflect.resolveJavaMethod() correctly resolves by (indirectly) creating =
proxy object for "this" that implements ActionListener.=20
The problem is that resolveJavaMethod() calls findExtendedMethod(), =
wants to replace the "this" object in the argument list "args" with the
proxy object. You see the tempArgs array being created, and args being
overwritten with tempArgs.=20
Unfortunately, before calling findExtendedMethod(), resolveJavaMethod() =
args =3D unwrapPrimitives(args);
which means that resolveJavaMethod()'s _caller_'s args are not being
properly overwritten, and thus we call Method.invokeMethod() with the
original arguments (the XThis object), which causes the above exception.
I tried to fix this in resolveJavaMethod() by writing the output of
unwrapPrimitives into another variable "xargs", and passing that to
findExtendedMethod() and cacheResolvedMethod(), and finally, before =
copying xargs into args.
This works - the desktop now comes up. But then,
PROBLEM 3: this solution sort of breaks the method caching, since the =
is being cached with the proxy object's class as the "actual parameter" =
is matched (which never matches "this"). So we keep missing in the =
I'd like to just open a bunch of bugs about this, but these are all sort =
related, so I wonder if it should be 1 bug ("desktop does not come up" =
Get latest updates about Open Source Projects, Conferences and News.