In bsh.Reflect.java the below code fails if debug is turned on and one of
method arguments is null.
Since args[i] is null, args[i].getClass() throws NullPointerException.
This makes debuging impossible in some cases.
Line:
+" type = "+args[i].getClass() );
Should be:
+" type = "+(args[i] == null ? "void" : args[i].getClass()) );
private static void logInvokeMethod(
String msg, Method method, Object[] args )
{
if ( Interpreter.DEBUG )
{
Interpreter.debug( msg +method+" with args:" );
for(int i=0; i<args.length; i++)
Interpreter.debug(
"args["+i+"] = "+args[i]
+" type = "+args[i].getClass() );
}
}
Nobody/Anonymous ( nobody ) - 2009-02-04 01:38
5
Open
None
Nobody/Anonymous
General
None
Public
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use