HannesWell commented on code in PR #148:
URL: 
https://github.com/apache/maven-toolchains-plugin/pull/148#discussion_r2920011205


##########
src/main/java/org/apache/maven/plugins/toolchain/jdk/SelectJdkToolchainMojo.java:
##########
@@ -255,7 +255,7 @@ private boolean matches(String key, String reqVal, String 
tcVal) {
             case VERSION:
                 return 
RequirementMatcherFactory.createVersionMatcher(tcVal).matches(reqVal);
             case ENV:
-                return reqVal.matches("(.*,|^)\\Q" + tcVal + "\\E(,.*|$)");
+                return tcVal.matches("(.*,|^)\\Q" + reqVal + "\\E(,.*|$)");

Review Comment:
   I had a second look and maybe it's simpler than assumed. And I oversaw the 
IT tests.
   But I assume a unit test would be possible relatively easy.
   I'm looking into it.



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