Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0-beta-6
-
None
-
None
Description
Invoker.asArray() does not do the right thing when converting input args into compatible args for Constructor.newInstance().
Specifically, when calling a constructor with one argument of type String[], asArray() does not wrap the input arguments in a new Object[], which results in passing the input String[] to the constructor, which then throws an IllegalArumentException, as it expected something like: new Object[]
{ stringArray }My guess is that this problem occurs for all constructors which take a single argument, whoes value passes an instanceof Object[] test.
I tested that hacking up Invoker.asArray with:
if (arguments instanceof String[]) {
return new Object[]
;
}
did the right thing.
--jason