nielsbasjes commented on code in PR #11770:
URL: https://github.com/apache/maven/pull/11770#discussion_r3652024712
##########
maven-core/src/main/java/org/apache/maven/toolchain/RequirementMatcherFactory.java:
##########
@@ -79,6 +81,31 @@ public boolean matches(String requirement) {
}
}
+ private static final Pattern PATTERN_MAJOR_VERSION =
Pattern.compile("^[0-9]+$");
+ private static final Pattern PATTERN_MAJOR_MINOR_VERSION =
Pattern.compile("^[0-9]\\.[0-9]+$");
Review Comment:
You're quick :)
I was going through the comments step by step.
Just fixed this.
Also note that the AI generated improvement is incorrect (missing '^' and
'$'):
```
private static final Pattern MAJOR_ONLY = Pattern.compile("[0-9]+");
private static final Pattern MAJOR_MINOR =
Pattern.compile("[0-9]+\\.[0-9]+");
```
--
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]