@Test void doesntDirtyContext() throws ScriptException { nashornScriptEngine.eval("piet = 3"); Exception exception = assertThrows(ScriptException.class, () -> nashornScriptEngine.eval("piet")); assertThat(exception.getMessage()) .containsPattern("ReferenceError: \"piet\" is not defined in <eval> at line number 1"); }
public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } NashornScriptEngine(); }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } NashornScriptEngine(); Object eval(String script); Object eval(Bindings bindings, String expression); ScriptObjectMirror newJSArray(); }
NashornScriptEngine { public Object eval(String script) throws ScriptException { return convertNashornValue(scriptEngine.eval(script, new SimpleBindings())); } NashornScriptEngine(); Object eval(String script); Object eval(Bindings bindings, String expression); ScriptObjectMirror newJSArray();  }