From 5e27148d8259474dbe3f07d8125182f1e81f5b34 Mon Sep 17 00:00:00 2001 From: jmp Date: Mon, 26 Oct 2020 12:29:13 -0700 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Throw=20AmbiguousNodeException=20fo?= =?UTF-8?q?r=20more=20ambiguous=20cases?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cloud/commandframework/CommandTree.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cloud-core/src/main/java/cloud/commandframework/CommandTree.java b/cloud-core/src/main/java/cloud/commandframework/CommandTree.java index e0b225a2..02fcbaa8 100644 --- a/cloud-core/src/main/java/cloud/commandframework/CommandTree.java +++ b/cloud-core/src/main/java/cloud/commandframework/CommandTree.java @@ -729,7 +729,9 @@ public final class CommandTree { } final int size = node.children.size(); for (final Node> child : node.children) { - if (child.getValue() != null && !child.getValue().isRequired() && size > 1) { + if (child.getValue() != null + && !(child.getValue() instanceof StaticArgument) + && size > 1) { throw new AmbiguousNodeException( node.getValue(), child.getValue(),