NO-JIRA fix possible STOMP NPE
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/b7d7d134 Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/b7d7d134 Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/b7d7d134 Branch: refs/heads/master Commit: b7d7d134ebe1dea21c6d89c60410d4f54ef78a6c Parents: dfdc4ff Author: Justin Bertram <[email protected]> Authored: Tue Feb 21 09:08:13 2017 -0600 Committer: Clebert Suconic <[email protected]> Committed: Tue Feb 21 22:22:12 2017 -0500 ---------------------------------------------------------------------- .../apache/activemq/artemis/core/protocol/stomp/StompFrame.java | 4 ++++ 1 file changed, 4 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b7d7d134/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompFrame.java ---------------------------------------------------------------------- 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 50c3108..439eba2 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];
