Skip to content

Commit b01bf8e

Browse files
author
Rob Harrop
committed
Make counter final for thread-safety
1 parent c2e2a75 commit b01bf8e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/com/rabbitmq/client/impl/ChannelN.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public class ChannelN extends AMQChannel implements com.rabbitmq.client.Channel
107107

108108
/** Current published message count (used by publisher acknowledgements)
109109
*/
110-
private AtomicLong publishedMessageCount = new AtomicLong(-1);
110+
private final AtomicLong publishedMessageCount = new AtomicLong(-1);
111111

112112
/** Reference to the currently-active default consumer, or null if there is
113113
* none.
@@ -590,7 +590,7 @@ public Exchange.UnbindOk exchangeUnbind(String destination, String source,
590590
String routingKey) throws IOException {
591591
return exchangeUnbind(destination, source, routingKey, null);
592592
}
593-
593+
594594
/** Public API - {@inheritDoc} */
595595
public Queue.DeclareOk queueDeclare(String queue, boolean durable, boolean exclusive,
596596
boolean autoDelete, Map<String, Object> arguments)

0 commit comments

Comments
 (0)