elharo commented on code in PR #67:
URL:
https://github.com/apache/maven-scripting-plugin/pull/67#discussion_r2652167640
##########
src/main/java/org/apache/maven/plugins/scripting/ResourceScriptEvaluator.java:
##########
@@ -66,14 +66,21 @@ public ResourceScriptEvaluator(String engineName, String
resourceName) {
*/
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);
+ try (InputStream is =
this.getClass().getClassLoader().getResourceAsStream(resourceName)) {
+
+ if (is == null) {
+ throw new ScriptException("Resource not found : " +
resourceName);
Review Comment:
no space before the colon
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]