commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ohe...@apache.org
Subject svn commit: r617833 - /commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
Date Sat, 02 Feb 2008 17:06:05 GMT
Author: oheger
Date: Sat Feb  2 09:06:04 2008
New Revision: 617833

URL: http://svn.apache.org/viewvc?rev=617833&view=rev
Log:
Removed dependency to commons-collections from AppletConfiguration

Modified:
    commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java

Modified: commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
URL: http://svn.apache.org/viewvc/commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java?rev=617833&r1=617832&r2=617833&view=diff
==============================================================================
--- commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
(original)
+++ commons/proper/configuration/branches/configuration2_experimental/src/main/java/org/apache/commons/configuration2/web/AppletConfiguration.java
Sat Feb  2 09:06:04 2008
@@ -18,9 +18,9 @@
 package org.apache.commons.configuration2.web;
 
 import java.applet.Applet;
+import java.util.ArrayList;
 import java.util.Iterator;
-
-import org.apache.commons.collections.iterators.ArrayIterator;
+import java.util.List;
 
 /**
  * A configuration wrapper to read applet parameters. This configuration is
@@ -52,15 +52,15 @@
         return handleDelimiters(applet.getParameter(key));
     }
 
-    public Iterator getKeys()
+    public Iterator<String> getKeys()
     {
         String[][] paramsInfo = applet.getParameterInfo();
-        String[] keys = new String[paramsInfo != null ? paramsInfo.length : 0];
-        for (int i = 0; i < keys.length; i++)
+        List<String> keyList = new ArrayList<String>(paramsInfo.length);
+        for (int i = 0; i < paramsInfo.length; i++)
         {
-            keys[i] = paramsInfo[i][0];
+            keyList.add(paramsInfo[i][0]);
         }
 
-        return new ArrayIterator(keys);
+        return keyList.iterator();
     }
 }



Mime
View raw message