Fix for the following exception that could occur:

java.lang.UnsupportedOperationException
        at java.util.AbstractCollection.add(AbstractCollection.java:216)
        at java.util.AbstractCollection.addAll(AbstractCollection.java:318)
        at org.apache.activemq.store.journal.JournalPersistenceAdapter.getDestinations(JournalPersistenceAdapter.java:139)        at org.apache.activemq.broker.region.AbstractRegion.getInactiveDestinations(AbstractRegion.java:193)
        at org.apache.activemq.broker.region.TopicRegion.getInactiveDestinations(TopicRegion.java:254)
        at org.apache.activemq.broker.region.AbstractRegion.addConsumer(AbstractRegion.java:157)
        at org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:113)





git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@412772 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-06-08 15:26:02 +00:00
parent 703d468a49
commit b4390246ca
1 changed files with 2 additions and 1 deletions

View File

@ -18,6 +18,7 @@ package org.apache.activemq.store.journal;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
@ -134,7 +135,7 @@ public class JournalPersistenceAdapter implements PersistenceAdapter, JournalEve
}
public Set getDestinations() {
Set destinations = longTermPersistence.getDestinations();
Set destinations = new HashSet(longTermPersistence.getDestinations());
destinations.addAll(queues.keySet());
destinations.addAll(topics.keySet());
return destinations;