elharo commented on code in PR #1022:
URL:
https://github.com/apache/maven-compiler-plugin/pull/1022#discussion_r2777754940
##########
src/main/java/org/apache/maven/plugin/compiler/Options.java:
##########
@@ -320,13 +320,13 @@ private boolean checkNumberOfArguments(String option, int
count, boolean immedia
if (expected == count) {
warning = null;
return true;
- } else if (expected < 1) {
+ } else if (expected == 0) {
Review Comment:
The original code looks like this:
```
} else if (expected < 1) {
if (checker instanceof ForkedCompiler) {
return true; // That implementation actually knows nothing
about which options are supported.
}
warning = "The '" + option + "' option is not supported.";
} else if (expected == 0) {
warning = "The '" + option + "' option does not expect any
argument.";
}
```
So if expected == 0 do we still need to check if checker instanceof
ForkedCompiler?
--
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]