Skip to content

ResourceScriptEvaluator NullPointerException #66

Description

@elharo

Affected version

HEAD

Bug description

Problem here:

    protected Object eval(ScriptEngine engine, ScriptContext context) throws ScriptException {

        try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourceName);
                Reader reader = new InputStreamReader(is)) {
            return engine.eval(reader, context);
        } catch (IOException ex) {
            throw new UncheckedIOException(resourceName + " caused:", ex);
        }
    }

probably catch the NullPointerException and convert it to a ScriptException, or maybe do that in the calling method

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions