From fe0cb648d60ee6bab98f5f86225bbe18ca7c42de Mon Sep 17 00:00:00 2001 From: Martyn Taylor Date: Wed, 20 Jul 2016 13:24:09 +0100 Subject: [PATCH] ARTEMIS-335 Remove dead code from MQTTPublishManager --- .../core/protocol/mqtt/MQTTPublishManager.java | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java index fc61dd9fa9..c985c0f3fd 100644 --- a/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java +++ b/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java @@ -90,16 +90,7 @@ public class MQTTPublishManager { } private int generateMqttId(int qos) { - if (qos == 1) { - return session.getSessionState().generateId(); - } - else { - Integer mqttid = session.getSessionState().generateId(); - if (mqttid == null) { - mqttid = (int) session.getServer().getStorageManager().generateID(); - } - return mqttid; - } + return session.getSessionState().generateId(); } /**