ResourceScriptEvaluator NullPointerException
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 42/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- java
- Domain
- build-system
Research direction
Start at ResourceScriptEvaluator.eval, specifically the resource stream and reader setup shown in the issue. Reproduce the missing-resource case and determine how it should be reported; done means it produces a ScriptException instead of a NullPointerException.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Java
- Stars
- 15
- Forks
- 10
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/maven-scripting-plugin
-
enhancement
Difficulty 4/5 3-5 days Newbie friendliness 30/100
-
UncheckedIOException Openbug
Difficulty 4/5 3-5 days Newbie friendliness 35/100
apache/maven-scripting-plugin#65 · 2 comments ·
All issues in apache/maven-scripting-plugin
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
infinispan/infinispan#18150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
opensearch-project/k-NN#3597 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100