When I evaluate the string
fScriptEngine.eval("print(\"Hello World!\";");
with BeanShell 2.1b5 I get a the following exception stack:
java.lang.NullPointerException
at bsh.ParseException.getErrorLineNumber(ParseException.java:276)
at bsh.BshScriptEngine.evalSource(BshScriptEngine.java:93)
at bsh.BshScriptEngine.eval(BshScriptEngine.java:61)
at javax.script.AbstractScriptEngine.eval(AbstractScriptEngine.java:247)
at test.scripting.ScriptRunner.runScripts(ScriptRunner.java:260)
at test.scripting.ScriptRunner.main(ScriptRunner.java:553)
The same evaluation with BeanShell 2.0b5 will show me the expected result:
In file: inline evaluation of: ``print("Hello World!";'' Encountered "( \"Hello
World!\" ;" at line 1, column 6.
in inline evaluation of: ``print("Hello World!";'' at line number 1
Both eval() calls use the following exception handling:
catch (ScriptException e) {
System.err.println(e.getLocalizedMessage());
}
Original issue reported on code.google.com by maroch...@gmail.com on 28 Feb 2012 at 8:38
Original issue reported on code.google.com by
maroch...@gmail.com
on 28 Feb 2012 at 8:38