slawekjaranowski commented on code in PR #11770:
URL: https://github.com/apache/maven/pull/11770#discussion_r3112322828


##########
maven-core/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java:
##########
@@ -79,6 +81,29 @@ public boolean matches(String requirement) {
             }
         }
 
+        private VersionRange convertRequirementToVersionRange(String 
requirement)
+                throws InvalidVersionSpecificationException {
+            // Specific for Version _requirement_ matching;
+            // If the version is a simple integer (like "25")
+            // then treat this as the requirement "the major version is 25"
+            if (Pattern.matches("^[0-9]+$", requirement)) {

Review Comment:
   We can move pattern compile to static filed 



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