summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorSoniEx2 <endermoneymod@gmail.com>2022-07-14 00:30:46 -0300
committerSoniEx2 <endermoneymod@gmail.com>2022-07-14 00:30:46 -0300
commit5200e97d90e2adbeebdf06bd756f66df4e8f1b01 (patch)
treef107d2e773f331e63c2e6b90eb8f9f0fc019ea56
parent75a06bc421522ca131ee1751f84fcf6970cebc98 (diff)
Add check for empty key
-rw-r--r--gradle.properties2
-rw-r--r--src/main/java/ganarchy/friendcode/sam/I2PSamCommand.java4
2 files changed, 5 insertions, 1 deletions
diff --git a/gradle.properties b/gradle.properties
index 4f87cf7..1d72a4f 100644
--- a/gradle.properties
+++ b/gradle.properties
@@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
 	loader_version=0.14.8
 
 # Mod Properties
-	mod_version = 1.0.1
+	mod_version = 1.1.0-SNAPSHOT
 	maven_group = ganarchy.friendcode.mc_1_19
 	archives_base_name = friendcode-mc1.19
 
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