activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r412772 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
Date Thu, 08 Jun 2006 15:26:03 GMT
Author: chirino
Date: Thu Jun  8 08:26:02 2006
New Revision: 412772

URL: http://svn.apache.org/viewvc?rev=412772&view=rev
Log:
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)




Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
URL: http://svn.apache.org/viewvc/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java?rev=412772&r1=412771&r2=412772&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/store/journal/JournalPersistenceAdapter.java
Thu Jun  8 08:26:02 2006
@@ -18,6 +18,7 @@
 
 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 Set getDestinations() {
-        Set destinations = longTermPersistence.getDestinations();
+        Set destinations = new HashSet(longTermPersistence.getDestinations());
         destinations.addAll(queues.keySet());
         destinations.addAll(topics.keySet());
         return destinations;



Mime
View raw message