Avoid creating a Throwable in case of non-trace logging

(cherry picked from commit 2a95348182)
This commit is contained in:
saivr1t 2018-05-14 15:11:10 +03:00 committed by Christopher L. Shannon (cshannon)
parent 0bd15a2a3e
commit 20f6c0a035
1 changed files with 3 additions and 1 deletions

View File

@ -950,7 +950,9 @@ public class ActiveMQSession implements Session, QueueSession, TopicSession, Sta
@Override @Override
public void afterRollback() throws Exception { 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 // ensure we don't filter this as a duplicate
connection.rollbackDuplicate(ActiveMQSession.this, md.getMessage()); connection.rollbackDuplicate(ActiveMQSession.this, md.getMessage());