diff options
Diffstat (limited to 'src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java')
-rw-r--r-- | src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java b/src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java index bed5bb8..b1cece8 100644 --- a/src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java +++ b/src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java @@ -45,6 +45,10 @@ record I2PSamCommand(String name, String opcode, Map<String, String> parameters) throw new IllegalArgumentException("name must not be empty"); } + if (this.parameters.containsKey("")) { + throw new IllegalArgumentException("parameter key must not be empty"); + } + // check for PING/PONG if (this.name.equals("PING") || this.name.equals("PONG")) { // reject parameters |