HannesWell commented on code in PR #148:
URL:
https://github.com/apache/maven-toolchains-plugin/pull/148#discussion_r2920434932
##########
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've now figured out how to setup an integration test (and handle the
trickery of Windows path with back-slashes).
Setting up a unit test would probably also be possible with the adjustments
you mentioned, but since the most relevant part of the logic is in the Mojo,
would again need more non trivial test setup.
--
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]