romani 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_r386064511
##########
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:
CI show us that this ignore doesnot work and JVM is terminated.
Can we use reflection to check that method is actually present, and catch
will not be required.
----------------------------------------------------------------
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