logo       

[jira] Created: (JEXL-62) NPE in Interpreter when using createScript(): msg#00437

issues-commons-apache

Subject: [jira] Created: (JEXL-62) NPE in Interpreter when using createScript()

NPE in Interpreter when using createScript()
--------------------------------------------

Key: JEXL-62
URL: https://issues.apache.org/jira/browse/JEXL-62
Project: Commons JEXL
Issue Type: Bug
Affects Versions: 2.0
Reporter: Sebb


The following script works OK when using createExpression() + evaluate(), but
causes an NPE when using createScript() + execute():

{code}
ctxt.getVars().put("dummy", "abcd");
sys=dummy.Class.forName("java.lang.System");
now=sys.currentTimeMillis(); // this works OK
sys.out.println('test'); // This line causes NPE as below

java.lang.NullPointerException
at org.apache.commons.jexl.Interpreter.visit(Interpreter.java:890)
at
org.apache.commons.jexl.parser.ASTReference.jjtAccept(ASTReference.java:17)
at org.apache.commons.jexl.Interpreter.visit(Interpreter.java:912)
at
org.apache.commons.jexl.parser.ASTReferenceExpression.jjtAccept(ASTReferenceExpression.java:17)
at org.apache.commons.jexl.Interpreter.visit(Interpreter.java:624)
at
org.apache.commons.jexl.parser.ASTJexlScript.jjtAccept(ASTJexlScript.java:17)
at org.apache.commons.jexl.Interpreter.interpret(Interpreter.java:157)
at org.apache.commons.jexl.ScriptImpl.execute(ScriptImpl.java:49)
{code}


--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise