directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seelm...@apache.org
Subject svn commit: r576106 - /directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
Date Sun, 16 Sep 2007 13:47:20 GMT
Author: seelmann
Date: Sun Sep 16 06:47:19 2007
New Revision: 576106

URL: http://svn.apache.org/viewvc?rev=576106&view=rev
Log:
Removed Iterator

Modified:
    directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java

Modified: directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java?rev=576106&r1=576105&r2=576106&view=diff
==============================================================================
--- directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
(original)
+++ directory/studio/trunk/studio-connection-core/src/main/java/org/apache/directory/studio/connection/core/ConnectionManager.java
Sun Sep 16 06:47:19 2007
@@ -27,7 +27,6 @@
 import java.io.FileWriter;
 import java.io.IOException;
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.commons.io.FileUtils;
@@ -123,9 +122,8 @@
      */
     public Connection getConnectionById( String id )
     {
-        for ( Iterator<?> it = connectionList.iterator(); it.hasNext(); )
+        for ( Connection conn:connectionList )
         {
-            Connection conn = ( Connection ) it.next();
             if ( conn.getConnectionParameter().getId().equals( id ) )
             {
                 return conn;
@@ -145,9 +143,8 @@
      */
     public Connection getConnectionByName( String name )
     {
-        for ( Iterator<?> it = connectionList.iterator(); it.hasNext(); )
+        for ( Connection conn:connectionList )
         {
-            Connection conn = ( Connection ) it.next();
             if ( conn.getConnectionParameter().getName().equals( name ) )
             {
                 return conn;



Mime
View raw message