activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cshan...@apache.org
Subject [1/2] activemq git commit: AMQ-6959 Avoid creating a Throwable in case of non-trace logging
Date Mon, 14 May 2018 13:02:00 GMT
Repository: activemq
Updated Branches:
  refs/heads/master b8cfab97d -> 365c1bbe9


AMQ-6959
Avoid creating a Throwable in case of non-trace logging


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

Branch: refs/heads/master
Commit: 2a953481821fcbfefbdd235a2c5b7f7e7ef8a6b7
Parents: b8cfab9
Author: saivr1t <alexansavon@gmail.com>
Authored: Mon May 14 15:11:10 2018 +0300
Committer: saivr1t <alexansavon@gmail.com>
Committed: Mon May 14 15:11:10 2018 +0300

----------------------------------------------------------------------
 .../src/main/java/org/apache/activemq/ActiveMQSession.java       | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/2a953481/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
----------------------------------------------------------------------
diff --git a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
index 1e82af8..af043d0 100644
--- a/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
+++ b/activemq-client/src/main/java/org/apache/activemq/ActiveMQSession.java
@@ -950,7 +950,9 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession,
Sta
 
                             @Override
                             public void afterRollback() throws Exception {
-                                LOG.trace("rollback {}", ack, new Throwable("here"));
+                                if (LOG.isTraceEnabled()) {
+                                    LOG.trace("rollback {}", ack, new Throwable("here"));
+                                }
                                 // ensure we don't filter this as a duplicate
                                 connection.rollbackDuplicate(ActiveMQSession.this, md.getMessage());
 


Mime
View raw message