Skip to content

ResourceScriptEvaluator NullPointerException #66

@elharo

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

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