From 72bf5b7a0a0b794900361f7665e29faf05305bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Thu, 28 Jul 2016 19:58:10 +0300 Subject: [PATCH] ARTEMIS-611 Remove redundant null check --- .../artemis/core/protocol/stomp/StompConnection.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java index 07a85b1207..28d0de4813 100644 --- a/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java +++ b/artemis-protocols/artemis-stomp-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/stomp/StompConnection.java @@ -286,11 +286,9 @@ public final class StompConnection implements RemotingConnection { return; } - if (me != null) { - StompFrame frame = frameHandler.createStompFrame(Stomp.Responses.ERROR); - frame.addHeader(Stomp.Headers.Error.MESSAGE, me.getMessage()); - sendFrame(frame); - } + StompFrame frame = frameHandler.createStompFrame(Stomp.Responses.ERROR); + frame.addHeader(Stomp.Headers.Error.MESSAGE, me.getMessage()); + sendFrame(frame); destroyed = true; }