From a5eb7c6fa27d2f3011a4c48ebe311dd983f51dae Mon Sep 17 00:00:00 2001 From: Gary Tully Date: Fri, 5 Oct 2012 19:04:18 +0000 Subject: [PATCH] polish: some typos git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1394732 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/activemq/broker/region/Topic.java | 18 +++++++++--------- .../DurableSubscriptionSelectorTest.java | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java b/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java index f7350c0dc9..8e27be1bb7 100755 --- a/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java +++ b/activemq-core/src/main/java/org/apache/activemq/broker/region/Topic.java @@ -67,7 +67,7 @@ public class Topic extends BaseDestination implements Task { private final ReentrantReadWriteLock dispatchLock = new ReentrantReadWriteLock(); private DispatchPolicy dispatchPolicy = new SimpleDispatchPolicy(); private SubscriptionRecoveryPolicy subscriptionRecoveryPolicy; - private final ConcurrentHashMap durableSubcribers = new ConcurrentHashMap(); + private final ConcurrentHashMap durableSubscribers = new ConcurrentHashMap(); private final TaskRunner taskRunner; private final LinkedList messagesWaitingForSpace = new LinkedList(); private final Runnable sendMessagesWaitingForSpaceTask = new Runnable() { @@ -171,7 +171,7 @@ public class Topic extends BaseDestination implements Task { } } } - durableSubcribers.put(dsub.getSubscriptionKey(), dsub); + durableSubscribers.put(dsub.getSubscriptionKey(), dsub); } } @@ -188,7 +188,7 @@ public class Topic extends BaseDestination implements Task { public void deleteSubscription(ConnectionContext context, SubscriptionKey key) throws Exception { if (topicStore != null) { topicStore.deleteSubscription(key.clientId, key.subscriptionName); - DurableTopicSubscription removed = durableSubcribers.remove(key); + DurableTopicSubscription removed = durableSubscribers.remove(key); if (removed != null) { destinationStatistics.getConsumers().decrement(); // deactivate and remove @@ -505,7 +505,7 @@ public class Topic extends BaseDestination implements Task { } private boolean canOptimizeOutPersistence() { - return durableSubcribers.size() == 0; + return durableSubscribers.size() == 0; } @Override @@ -590,7 +590,7 @@ public class Topic extends BaseDestination implements Task { }); final ConnectionContext connectionContext = createConnectionContext(); for (Message message : toExpire) { - for (DurableTopicSubscription sub : durableSubcribers.values()) { + for (DurableTopicSubscription sub : durableSubscribers.values()) { if (!sub.isActive()) { messageExpired(connectionContext, sub, message); } @@ -725,9 +725,9 @@ public class Topic extends BaseDestination implements Task { protected boolean isOptimizeStorage(){ boolean result = false; - if (isDoOptimzeMessageStorage() && durableSubcribers.isEmpty()==false){ + if (isDoOptimzeMessageStorage() && durableSubscribers.isEmpty()==false){ result = true; - for (DurableTopicSubscription s : durableSubcribers.values()) { + for (DurableTopicSubscription s : durableSubscribers.values()) { if (s.isActive()== false){ result = false; break; @@ -755,7 +755,7 @@ public class Topic extends BaseDestination implements Task { public void clearPendingMessages() { dispatchLock.readLock().lock(); try { - for (DurableTopicSubscription durableTopicSubscription : durableSubcribers.values()) { + for (DurableTopicSubscription durableTopicSubscription : durableSubscribers.values()) { clearPendingAndDispatch(durableTopicSubscription); } } finally { @@ -777,6 +777,6 @@ public class Topic extends BaseDestination implements Task { } public Map getDurableTopicSubs() { - return durableSubcribers; + return durableSubscribers; } } diff --git a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java index 53c2ffd5a4..83f9bb3d06 100644 --- a/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/usecases/DurableSubscriptionSelectorTest.java @@ -78,12 +78,12 @@ public class DurableSubscriptionSelectorTest extends org.apache.activemq.TestSup Wait.waitFor(new Wait.Condition() { public boolean isSatisified() { return received >= 1;} }, 10000); - assertEquals("Message is not recieved.", 1, received); + assertEquals("Message is not received.", 1, received); sendMessage(true); Thread.sleep(100); - assertEquals("Message is not recieved.", 2, received); + assertEquals("Message is not received.", 2, received); } private void openConsumer() throws Exception {