summary refs log tree commit diff stats
path: root/src/main
diff options
context:
space:
mode:
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java4
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