This is an automated email from the ASF dual-hosted git repository.

elharo pushed a commit to branch dep
in repository https://gitbox.apache.org/repos/asf/maven-compiler-plugin.git

commit 1b0ac44dc65d45b5b810fe9a5db7c35991114db4
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Tue Jan 27 08:03:28 2026 -0500

    Reorder cases to avoid skipping
---
 src/main/java/org/apache/maven/plugin/compiler/Options.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/main/java/org/apache/maven/plugin/compiler/Options.java 
b/src/main/java/org/apache/maven/plugin/compiler/Options.java
index 74e664e..bc34e66 100644
--- a/src/main/java/org/apache/maven/plugin/compiler/Options.java
+++ b/src/main/java/org/apache/maven/plugin/compiler/Options.java
@@ -320,13 +320,13 @@ public final class Options {
         if (expected == count) {
             warning = null;
             return true;
-        } else if (expected < 1) {
+        } else if (expected == 0) {
+            warning = "The '" + option + "' option does not expect any 
argument.";
+        } else if (expected < 0) {
             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.";
         } else if (expected == 1) {
             warning = "The '" + option + "' option expects a single argument.";
         } else {

Reply via email to