NPE with custom Namespace

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

NPE with custom Namespace

S D-2
Hi, I have extended Namespace class and set it as the namespace for the interpreter. If I have a variable whose value is returned as null by my namespace, and if that variable is used in the script evaluated with the interpreter, it throws NPE. Below is the trace. I am using bsh 2.0b4

Target exception: java.lang.NullPointerException

        at bsh.BSHMethodInvocation.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.BSHPrimaryExpression.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)
        at bsh.Interpreter.eval(Unknown Source)

I modified the getVariable impelementation to return Primitive.NULL for null values, still no luck.

-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Beanshell-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/beanshell-users