svn commit: r717979 - /xml/xindice/trunk/java/src/org/apache/xindice/core/Database.java

[email protected]
Newsgroups gmane.text.xml.xindice.devel
Message-ID <[email protected]>
Author: vgritsenko
Date: Sat Nov 15 20:45:41 2008
New Revision: 717979

URL: http://svn.apache.org/viewvc?rev=717979&view=rev
Log:
cleanup

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

Modified: xml/xindice/trunk/java/src/org/apache/xindice/core/Database.java
URL: http://svn.apache.org/viewvc/xml/xindice/trunk/java/src/org/apache/xindice/core/Database.java?rev=717979&r1=717978&r2=717979&view=diff
==============================================================================
--- xml/xindice/trunk/java/src/org/apache/xindice/core/Database.java (original)
+++ xml/xindice/trunk/java/src/org/apache/xindice/core/Database.java Sat Nov 15 20:45:41 2008
@@ -41,6 +41,7 @@
 import java.util.Date;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.Set;
 import java.util.Timer;
 
 /**
@@ -139,7 +140,8 @@
 
     public static String[] listDatabases() {
         synchronized (databases) {
-            return (String[]) databases.keySet().toArray(new String[0]);
+            Set names = databases.keySet();
+            return (String[]) names.toArray(new String[names.size()]);
         }
     }
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.