Skip to content

Commit 2298ce9

Browse files
committed
Fix empty command-description creating empty literals instead of base-commands
1 parent d3a8c5a commit 2298ce9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bluecommands-core/src/main/java/de/bluecolored/bluecommands/BlueCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public Command<C, Object> createCommand(Object holder) {
9999
}
100100

101101
private Command<C, Object> createCommand(Object holder, Method method, String description) {
102-
String[] tokens = description.trim().split(" +");
102+
String[] tokens = description.isBlank() ? new String[0] : description.trim().split(" +");
103103
try {
104104
return createCommand(holder, method, tokens, 0);
105105
} catch (CommandSetupException ex) {

0 commit comments

Comments
 (0)