From bfe336f9e555b915aafac78b56ee90a1ae2b64b6 Mon Sep 17 00:00:00 2001 From: ajgeiss0702 Date: Sat, 21 Oct 2023 11:25:04 -0700 Subject: [PATCH] Skip invalid protocol names when moving them --- common/src/main/java/us/ajg0702/queue/common/QueueMain.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/src/main/java/us/ajg0702/queue/common/QueueMain.java b/common/src/main/java/us/ajg0702/queue/common/QueueMain.java index 3b0b5a03..3f281c6f 100644 --- a/common/src/main/java/us/ajg0702/queue/common/QueueMain.java +++ b/common/src/main/java/us/ajg0702/queue/common/QueueMain.java @@ -341,6 +341,10 @@ private void constructMessages() { List oldProtocolNames = config.getStringList("protocol-names"); for (String oldProtocolName : oldProtocolNames) { String[] parts = oldProtocolName.split(":"); + if(parts.length != 2) { + logger.warn("Invalid old (in the config) protocol name '" + oldProtocolName + "'. Skipping."); + continue; + } String protocol = parts[0]; String name = parts[1];