You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2016/09/26 17:35:47 UTC

[2/2] activemq-artemis git commit: Don't generate unnecessary ID's on divert

Don't generate unnecessary ID's on divert


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

Branch: refs/heads/master
Commit: 056920e6ab86c21b2701e32a7e6c4bfb1788ef92
Parents: 061ca9c
Author: Ville Skytt� <vi...@iki.fi>
Authored: Wed Sep 14 15:32:21 2016 +0300
Committer: Clebert Suconic <cl...@apache.org>
Committed: Mon Sep 26 13:35:30 2016 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/core/server/impl/DivertImpl.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/056920e6/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
index 4316a98..ad24a44 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/DivertImpl.java
@@ -83,12 +83,11 @@ public class DivertImpl implements Divert {
          logger.trace("Diverting message " + message + " into " + this);
       }
 
-      long id = storageManager.generateID();
-
       ServerMessage copy = null;
 
       // Shouldn't copy if it's not routed anywhere else
       if (!forwardAddress.equals(message.getAddress())) {
+         long id = storageManager.generateID();
          copy = message.copy(id);
 
          // This will set the original MessageId, and the original address