commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1088097 - /commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/NameDiscoverers.java
Date Sat, 02 Apr 2011 19:48:20 GMT
Author: simonetripodi
Date: Sat Apr  2 19:48:20 2011
New Revision: 1088097

URL: http://svn.apache.org/viewvc?rev=1088097&view=rev
Log:
type agnostic Vector replaced by LinkedList<ResourceNameDiscover>

Modified:
    commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/NameDiscoverers.java

Modified: commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/NameDiscoverers.java
URL: http://svn.apache.org/viewvc/commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/NameDiscoverers.java?rev=1088097&r1=1088096&r2=1088097&view=diff
==============================================================================
--- commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/NameDiscoverers.java
(original)
+++ commons/proper/discovery/trunk/src/java/org/apache/commons/discovery/resource/names/NameDiscoverers.java
Sat Apr  2 19:48:20 2011
@@ -16,7 +16,8 @@
  */
 package org.apache.commons.discovery.resource.names;
 
-import java.util.Vector;
+import java.util.ArrayList;
+import java.util.List;
 
 import org.apache.commons.discovery.ResourceNameDiscover;
 import org.apache.commons.discovery.ResourceNameIterator;
@@ -40,7 +41,7 @@ public class NameDiscoverers
         log = _log;
     }
 
-    private Vector discoverers = new Vector();
+    private List<ResourceNameDiscover> discoverers = new ArrayList<ResourceNameDiscover>();
     
     /**
      *  Construct a new resource name discoverer
@@ -55,12 +56,12 @@ public class NameDiscoverers
      */
     public void addResourceNameDiscover(ResourceNameDiscover discover) {
         if (discover != null) {
-            discoverers.addElement(discover);
+            discoverers.add(discover);
         }
     }
 
     protected ResourceNameDiscover getResourceNameDiscover(int idx) {
-        return (ResourceNameDiscover)discoverers.get(idx);
+        return discoverers.get(idx);
     }
 
     protected int size() {



Mime
View raw message