svn commit: r564795 - /xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: natalia
Date: Fri Aug 10 16:01:39 2007
New Revision: 564795

URL: http://svn.apache.org/viewvc?view=rev&rev=564795
Log:
Fix for concurrent modification exception

Modified:
    xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java?view=diff&rev=564795&r1=564794&r2=564795
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/indexer/IndexManager.java Fri Aug 10 16:01:39 2007
@@ -163,9 +163,11 @@
      * Drop all indexers
      */
     public synchronized void drop() {
+        String[] names = (String[]) indexes.keySet().toArray(new String[0]);
+        
         // Drop indexes
-        for (Iterator i = indexes.keySet().iterator(); i.hasNext(); ) {
-            drop((String) i.next());
+        for (int i = 0; i < names.length; i++) {
+            drop(names[i]);
         }
     }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.