Skip to content

npe on setup that works with nashorn js engine #6

Description

@garth0jsonar

evaluating this:

var foo="dfsf";

I get this:

00:07:19.969 AWT-EventQueue-0 UtilSwing.eval: rt ex=java.lang.NullPointerException
java.lang.NullPointerException
	at ch.obermuhlner.scriptengine.jshell.JShellCompiledScript.setBindingsValue(JShellCompiledScript.java:84)

this is because global bindings are null there:

        if (!engineBindings.containsKey(name) && globalBindings.containsKey(name)) {

1.1.0 , latest adopt jdk 11. Suggest always init globalBindings.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions