Copilot commented on code in PR #306:
URL: 
https://github.com/apache/maven-remote-resources-plugin/pull/306#discussion_r4282043515


##########
src/main/java/org/apache/maven/plugin/resources/remote/AbstractProcessRemoteResourcesMojo.java:
##########
@@ -980,8 +979,7 @@ protected void processResourceBundles(ClassLoader 
classLoader, VelocityContext c
                     try (CachingOutputStream os = new 
CachingOutputStream(outputFile);
                             Reader reader = 
getReader(bundle.getSourceEncoding(), appendedVmResourceFile);
                             Writer writer = 
getWriter(bundle.getSourceEncoding(), os)) {
-                        Velocity.init();
-                        Velocity.evaluate(context, writer, "remote-resources", 
reader);
+                        velocity.evaluate(context, writer, "remote-resources", 
reader);

Review Comment:
   Using a hard-coded log tag (\"remote-resources\") makes it harder to trace 
which specific appended template caused a Velocity error. Consider using a more 
informative identifier such as the appended template path/filename (e.g., 
appendedVmResourceFile.getName() or its absolute/relative path) so 
ParseErrorException/MethodInvocationException messages are actionable.



-- 
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]

Reply via email to