Explicit byte[].toString(..) in debug message

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

Branch: refs/heads/master
Commit: b6093579bfd06810a510e63fed3c27a80112184b
Parents: d99991d
Author: Thiago Kronig <caa_tkro...@uolinc.com>
Authored: Fri May 8 20:12:15 2015 -0300
Committer: Clebert Suconic <clebertsuco...@apache.org>
Committed: Thu May 21 19:45:01 2015 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/artemis/core/server/impl/QueueImpl.java  | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/b6093579/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
----------------------------------------------------------------------
diff --git 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
index 226cf76..6e57af5 100644
--- 
a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
+++ 
b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/QueueImpl.java
@@ -2465,6 +2465,7 @@ public class QueueImpl implements Queue
       acknowledge(tx, ref);
    }
 
+   @SuppressWarnings({"ArrayToString", "ArrayToStringConcatentation"})
    private void moveBetweenSnFQueues(final SimpleString queueSuffix,
                                      final Transaction tx,
                                      final MessageReference ref) throws 
Exception
@@ -2481,7 +2482,8 @@ public class QueueImpl implements Queue
          if (propName.startsWith(MessageImpl.HDR_ROUTE_TO_IDS))
          {
             oldRouteToIDs = (byte[]) copyMessage.removeProperty(propName);
-            ActiveMQServerLogger.LOGGER.debug("Removed property from message: 
" + propName + " = " + oldRouteToIDs + " (" + 
ByteBuffer.wrap(oldRouteToIDs).getLong() + ")");
+            final String hashcodeToString = oldRouteToIDs.toString(); // don't 
use Arrays.toString(..) here
+            ActiveMQServerLogger.LOGGER.debug("Removed property from message: 
" + propName + " = " + hashcodeToString + " (" + 
ByteBuffer.wrap(oldRouteToIDs).getLong() + ")");
 
             // there should only be one of these properties so potentially 
save some loop iterations
             break;

Reply via email to