-
Notifications
You must be signed in to change notification settings - Fork 10
Fix for resource not available in ResourceScriptEvaluator #67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
|
|
||
| /** | ||
| * @param engineName optional engine name, used to override the engine selection from the file extension | ||
| * @param engineName optional engine name, used to override the engine selection from the file extension |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extra space not needed
|
|
||
| /** | ||
| * @param engine the script engine | ||
| * @param engine the script engine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove extra space
| return engine.eval(reader, context); | ||
| try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourceName)) { | ||
|
|
||
| if (is == null) throw new ScriptException("Resource not found : " + resourceName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error: src/main/java/org/apache/maven/plugins/scripting/ResourceScriptEvaluator.java:[71,13] (blocks) NeedBraces: 'if' construct must use '{}'s.
elharo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you signed the Apache CLA?
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
yes signed and emailed it; pls take a look now |
| try (InputStream is = this.getClass().getClassLoader().getResourceAsStream(resourceName)) { | ||
|
|
||
| if (is == null) { | ||
| throw new ScriptException("Resource not found : " + resourceName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no space before the colon
elharo
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run 'mvn spotless:apply' to fix these violations.
Signed-off-by: Avinash Niyas <avinashNiyaz1423@gmail.com>
Added Null check and throw of a ScriptException if resource is not available
fixes #66