activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbert...@apache.org
Subject [4/4] activemq-artemis git commit: ARTEMIS-335 Remove dead code from MQTTPublishManager
Date Thu, 21 Jul 2016 19:50:30 GMT
ARTEMIS-335 Remove dead code from MQTTPublishManager


Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/fe0cb648
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/fe0cb648
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/fe0cb648

Branch: refs/heads/master
Commit: fe0cb648d60ee6bab98f5f86225bbe18ca7c42de
Parents: e8b189a
Author: Martyn Taylor <mtaylor@redhat.com>
Authored: Wed Jul 20 13:24:09 2016 +0100
Committer: jbertram <jbertram@apache.org>
Committed: Thu Jul 21 14:47:20 2016 -0500

----------------------------------------------------------------------
 .../artemis/core/protocol/mqtt/MQTTPublishManager.java   | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/fe0cb648/artemis-protocols/artemis-mqtt-protocol/src/main/java/org/apache/activemq/artemis/core/protocol/mqtt/MQTTPublishManager.java
----------------------------------------------------------------------
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 fc61dd9..c985c0f 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();
    }
 
    /**


Mime
View raw message