Bukama commented on code in PR #11577:
URL: https://github.com/apache/maven/pull/11577#discussion_r2631622706
##########
maven-core/src/main/java/org/apache/maven/plugin/internal/MavenPluginJavaPrerequisiteChecker.java:
##########
@@ -47,9 +47,13 @@ public void accept(PluginDescriptor pluginDescriptor) {
}
boolean matchesVersion(String requiredVersion, String currentVersion) {
+ // Java 8 is consistent: it will always say "1.8...". Users are not
consistent.
+ if (!requiredVersion.contains("1.8") &&
currentVersion.startsWith("1.8")) {
+ currentVersion = currentVersion.substring(2);
+ }
VersionConstraint constraint;
try {
- constraint =
versionScheme.parseVersionConstraint(requiredVersion.equals("8") ? "1.8" :
requiredVersion);
Review Comment:
two lines above you substring `currentVersion` here it's about
`requiredVersion`. Is it intended or are you accidently mixing variables?
--
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]