diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-08-18 18:13:09 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-08-18 18:13:09 +0000 |
| commit | 0b577d8ebd8c7a35ad4c84ed1bc048f21bb2d9d6 (patch) | |
| tree | 48c5630c3edb97ce97ff6bdf0ef3a9f5b2b1d6e6 /qpid/java/client/src | |
| parent | 0aac869c52d2e75dd8ff82a6dfb76ee210fd4af8 (diff) | |
| download | qpid-python-0b577d8ebd8c7a35ad4c84ed1bc048f21bb2d9d6.tar.gz | |
QPID-6014 : [Java] declare variables as ConcurrentMap not ConcurrentHashMap to avoid linking issues after compiling under Java 8
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1618690 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client/src')
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java index 35252204ac..c2659194e2 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java @@ -31,6 +31,7 @@ import java.util.List; import java.util.Map; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.ConcurrentMap; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.CountDownLatch; import java.util.concurrent.atomic.AtomicBoolean; @@ -157,10 +158,10 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic /** Used to indicate that this session has been started at least once. */ private AtomicBoolean _startedAtLeastOnce = new AtomicBoolean(false); - private final ConcurrentHashMap<String, TopicSubscriberAdaptor<C>> _subscriptions = + private final ConcurrentMap<String, TopicSubscriberAdaptor<C>> _subscriptions = new ConcurrentHashMap<String, TopicSubscriberAdaptor<C>>(); - private final ConcurrentHashMap<C, String> _reverseSubscriptionMap = new ConcurrentHashMap<C, String>(); + private final ConcurrentMap<C, String> _reverseSubscriptionMap = new ConcurrentHashMap<C, String>(); private final Lock _subscriberDetails = new ReentrantLock(true); private final Lock _subscriberAccess = new ReentrantLock(true); @@ -200,7 +201,7 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic private CopyOnWriteArrayList<C> _removedConsumers = new CopyOnWriteArrayList<C>(); /** Provides a count of consumers on destinations, in order to be able to know if a destination has consumers. */ - private ConcurrentHashMap<Destination, AtomicInteger> _destinationConsumerCount = + private ConcurrentMap<Destination, AtomicInteger> _destinationConsumerCount = new ConcurrentHashMap<Destination, AtomicInteger>(); /** @@ -312,7 +313,7 @@ public abstract class AMQSession<C extends BasicMessageConsumer, P extends Basic public static final class IdToConsumerMap<C extends BasicMessageConsumer> { private final BasicMessageConsumer[] _fastAccessConsumers = new BasicMessageConsumer[16]; - private final ConcurrentHashMap<Integer, C> _slowAccessConsumers = new ConcurrentHashMap<Integer, C>(); + private final ConcurrentMap<Integer, C> _slowAccessConsumers = new ConcurrentHashMap<Integer, C>(); public C get(int id) { |
