opwvhk commented on a change in pull request #1588:
URL: https://github.com/apache/avro/pull/1588#discussion_r835225986



##########
File path: 
lang/java/maven-plugin/src/main/java/org/apache/avro/mojo/IDLProtocolMojo.java
##########
@@ -80,16 +80,16 @@ protected void doCompile(String filename, File 
sourceDirectory, File outputDirec
         }
       }
 
-      URLClassLoader projPathLoader = new 
URLClassLoader(runtimeUrls.toArray(new URL[0]),
-          Thread.currentThread().getContextClassLoader());
-      try (Idl parser = new Idl(new File(sourceDirectory, filename), 
projPathLoader)) {
-
-        Protocol p = parser.CompilationUnit();
-        for (String warning : parser.getWarningsAfterParsing()) {
+      final ClassLoader contextClassLoader = 
Thread.currentThread().getContextClassLoader();

Review comment:
       That's a bit tricky, as it requires a 2nd mojo, with e.g. 'old' in the 
name.
   I've added a feature flag instead.




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