arturobernalg opened a new pull request, #1883:
URL: https://github.com/apache/maven-mvnd/pull/1883

   `Environment#getCommandLineOption` always returned a non-null value for a 
VOID-type option (e.g. `mvnd.serial`) whenever any of its prefixes matched, 
regardless of what followed. `-Dmvnd.serial=false` and `--serial=false` were 
therefore indistinguishable from `--serial`, so an explicit "false" turned 
serial mode ON instead of leaving it off.
   
   Inspect the text after the matched prefix and treat an explicit "false" 
(case-insensitive) as turning the option off.
   
   Backport of the `Environment.java` part of #1855 from master, adapted to 
this branch: mvnd-1.x has since diverged (`DefaultClient.java` is split into 
`java-mvnd`/`java-fallback` source sets here, unlike master's single source 
set), so this backport is scoped to the independently reproducible and testable 
VOID-option bug. The other fixes bundled in #1855 (blank-argument handling, 
maven.config-aware threads/builder defaults, active-daemon log purge) touch the 
java-mvnd-only `DefaultClient` class, which this branch's test-compile 
classpath cannot resolve against (it resolves symbols against the java-fallback 
class instead), so they are left for a separate change.
   
   Added `EnvironmentTest#voidOptionHonoursExplicitFalse`, which fails on the 
current code and passes with the fix. Full `client`+`common` suite: 15/15 tests 
green. Checkstyle: no new violations on the touched lines (the branch has 
pre-existing, unrelated violations elsewhere).
   
   ---
   
   To make clear that you license your contribution under
   the [Apache License Version 2.0, January 
2004](https://www.apache.org/licenses/LICENSE-2.0)
   check one of the following:
   
   - [x] I hereby declare this contribution to be licensed under the [Apache 
License Version 2.0, January 2004](https://www.apache.org/licenses/LICENSE-2.0)
   - [x] I hereby declare that I have filed an [Apache Individual Contributor 
License Agreement](https://www.apache.org/licenses/icla.pdf).


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