hazendaz commented on a change in pull request #28: [MCHECKSTYLE-387] emit a 
warning when using an old version of checkstyle
URL: 
https://github.com/apache/maven-checkstyle-plugin/pull/28#discussion_r386159841
 
 

 ##########
 File path: 
src/main/java/org/apache/maven/plugins/checkstyle/exec/DefaultCheckstyleExecutor.java
 ##########
 @@ -314,6 +314,13 @@ public URLClassLoader run()
         try
         {
             checker.setClassLoader( projectClassLoader );
+            /*
+             * MCHECKSTYLE-387: If the previous method call was successful, 
emit a warning that the user is using
+             * an old version of checkstyle.
+             */
+            getLogger().warn( "Old version of checkstyle detected. Consider 
updating to >= v8.30" );
+            getLogger().warn( "For more information see: "
+                + 
"https://maven.apache.org/plugins/maven-checkstyle-plugin/examples/upgrading-checkstyle.html";
 );
         }
         catch ( NoSuchMethodError ignored )
 
 Review comment:
   @romani Can you post the error as you see it?  Based on a quick read here, 
I'm not sure how JVM would crash unless something is pointed out directly in 
checkstyle causing it.
   
   @bmhm I think this is a bad way to check this.  This assumes just because 
projectClassLoader can be set that it's an old version.  I think it would make 
more logical sense to put a check early on in the plugin that checks the 
classpath version maven is aware of to indicate old version is being used.  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to