From 412b63a6b5c5be097379f09c249f9c3bfb89e4ea Mon Sep 17 00:00:00 2001 From: Timothy Bish Date: Mon, 11 Sep 2017 15:01:18 -0400 Subject: [PATCH] ARTEMIS-1407 Remove unused method that performs invalid operation Remove the unused transaction remove method as the getTransaction method provides the remove operation and the remove method was doing an invalud remove of wrong type from the transactions collection. --- .../protocol/amqp/broker/AMQPConnectionCallback.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java index 0f91b7ff13..17cae8ecd6 100644 --- a/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java +++ b/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPConnectionCallback.java @@ -24,7 +24,6 @@ import java.util.concurrent.ConcurrentMap; import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicBoolean; -import io.netty.buffer.ByteBuf; import org.apache.activemq.artemis.api.core.ActiveMQBuffers; import org.apache.activemq.artemis.api.core.ActiveMQException; import org.apache.activemq.artemis.core.buffers.impl.ChannelBufferWrapper; @@ -55,6 +54,8 @@ import org.apache.qpid.proton.amqp.Symbol; import org.apache.qpid.proton.amqp.transport.AmqpError; import org.jboss.logging.Logger; +import io.netty.buffer.ByteBuf; + public class AMQPConnectionCallback implements FailureListener, CloseListener { private static final Logger logger = Logger.getLogger(AMQPConnectionCallback.class); @@ -261,11 +262,6 @@ public class AMQPConnectionCallback implements FailureListener, CloseListener { return tx; } - public Transaction removeTransaction(Binary txid) { - XidImpl xid = newXID(txid.getArray()); - return transactions.remove(xid); - } - protected XidImpl newXID() { return newXID(UUIDGenerator.getInstance().generateStringUUID().getBytes()); }