From b7d7d134ebe1dea21c6d89c60410d4f54ef78a6c Mon Sep 17 00:00:00 2001 From: Justin Bertram Date: Tue, 21 Feb 2017 09:08:13 -0600 Subject: [PATCH] NO-JIRA fix possible STOMP NPE --- .../activemq/artemis/core/protocol/stomp/StompFrame.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java index 50c3108029..439eba2823 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java @@ -171,6 +171,10 @@ public class StompFrame { } public String encode(String str) { + if (str == null) { + return ""; + } + int len = str.length(); char[] buffer = new char[2 * len];