commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric BELLARD <eric_bell...@yahoo.com>
Subject Problem using beanutils: MethodUtils.invokeMethod throw a null pointer exception
Date Thu, 01 Apr 2004 14:46:19 GMT
Hi,

I'm using MethodUtils.invokeMethod(Object myObject,
String methodName, Object[] parameters) to do some
reflection in my application and I got the following
problem:

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?

Thanks by advance.

Eric


=====
Eric BELLARD
eric@bellard.org
mobile: 0614952791

__________________________________
Do you Yahoo!?
Yahoo! Small Business $15K Web Design Giveaway 
http://promotions.yahoo.com/design_giveaway/

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message