Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions src/main/java/org/apache/maven/plugin/compiler/Options.java
Original file line number Diff line number Diff line change
Expand Up @@ -306,21 +306,22 @@ public boolean addMemoryValue(String option, String label, String value, boolean
* If not, a warning is logged if {@code immediate} is {@code true}, or stored in the
* {@link #warning} field if {@code immediate} is {@code false}.
*
* <p>If a message is stored in {@link #warning}, then it will always end with a dot.
* This guarantee allows callers to delete the last character and replace it by a coma
* <p>The message stored in {@link #warning} always ends with a dot.
* This guarantee allows callers to delete the last character and replace it with a comma
* for continuing the sentence.</p>
*
* @param option the option to validate
* @param count the number of arguments that the caller wants to provide
* @param immediate whether to log immediately or to store the message in {@link #warning}
* @return whether the given option is supported and accepts the specified number of arguments
* @return true if the given option is supported and accepts the specified number of arguments,
* false otherwise
*/
private boolean checkNumberOfArguments(String option, int count, boolean immediate) {
int expected = checker.isSupportedOption(option);
if (expected == count) {
warning = null;
return true;
} else if (expected < 1) {
} else if (expected < 0) {
if (checker instanceof ForkedCompiler) {
return true; // That implementation actually knows nothing about which options are supported.
}
Expand Down
Loading