Repository: activemq
Updated Branches:
  refs/heads/activemq-5.15.x 0bd15a2a3 -> 20f6c0a03


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

(cherry picked from commit 2a953481821fcbfefbdd235a2c5b7f7e7ef8a6b7)


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

Branch: refs/heads/activemq-5.15.x
Commit: 20f6c0a035fba7f9633487c0588bccee070ccf77
Parents: 0bd15a2
Author: saivr1t <alexansa...@gmail.com>
Authored: Mon May 14 15:11:10 2018 +0300
Committer: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com>
Committed: Mon May 14 09:03:03 2018 -0400

----------------------------------------------------------------------
 .../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/20f6c0a0/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());
 

Reply via email to