Eric BELLARD wrote:
I got a null point exception when passing as
parameters a table with a null value inside like this:
 [, , null, avionCargoFret, , ]
The following code inside beanutils send me the
exception when it does getClass the null element of
the table:

       Class parameterTypes [] = new Class[arguments];
        for (int i = 0; i < arguments; i++) {
            parameterTypes[i] = args[i].getClass();
        }

Is this a misuse of the MethodUtils.invokeMethod?
Is this a known limitation of the implementation?
Is  this a bug?
Is there any solution out there?


I had the same problem a few weeks ago. There is another version of invokeMethod that takes an array of Classes which represent parameter types. It then uses the array instead of trying to dynamically get the parameter types from the parameters, which fails when a parameter is null.

It should look like:

invokeMethod(Object, Class, Object[], Class[])

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to