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


##########
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:
   unit test will be enough, I'm fine to make method package protected and 
simply test it, 
   eg. we can provide many examples by parameterized test



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