maven-scm-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1055644 - /maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
Date Wed, 05 Jan 2011 21:21:31 GMT
Author: olamy
Date: Wed Jan  5 21:21:30 2011
New Revision: 1055644

URL: http://svn.apache.org/viewvc?rev=1055644&view=rev
Log:
[SCM-591] move to java 1.5 fix generics warnings in scm client

Modified:
    maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java

Modified: maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
URL: http://svn.apache.org/viewvc/maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java?rev=1055644&r1=1055643&r2=1055644&view=diff
==============================================================================
--- maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
(original)
+++ maven/scm/trunk/maven-scm-client/src/main/java/org/apache/maven/scm/client/cli/MavenScmCli.java
Wed Jan  5 21:21:30 2011
@@ -19,6 +19,9 @@ package org.apache.maven.scm.client.cli;
  * under the License.
  */
 
+import java.io.File;
+import java.util.List;
+
 import org.apache.maven.scm.ScmBranch;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.ScmFile;
@@ -37,10 +40,6 @@ import org.apache.maven.scm.repository.S
 import org.codehaus.plexus.embed.Embedder;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -245,14 +244,12 @@ public class MavenScmCli
             return;
         }
 
-        List checkedOutFiles = result.getCheckedOutFiles();
+        List<ScmFile> checkedOutFiles = result.getCheckedOutFiles();
 
         System.out.println( "Checked out these files: " );
 
-        for ( Iterator it = checkedOutFiles.iterator(); it.hasNext(); )
+        for ( ScmFile file : checkedOutFiles )
         {
-            ScmFile file = (ScmFile) it.next();
-
             System.out.println( " " + file.getPath() );
         }
     }
@@ -280,14 +277,12 @@ public class MavenScmCli
             return;
         }
 
-        List checkedInFiles = result.getCheckedInFiles();
+        List<ScmFile> checkedInFiles = result.getCheckedInFiles();
 
         System.out.println( "Checked in these files: " );
 
-        for ( Iterator it = checkedInFiles.iterator(); it.hasNext(); )
+        for ( ScmFile file : checkedInFiles )
         {
-            ScmFile file = (ScmFile) it.next();
-
             System.out.println( " " + file.getPath() );
         }
     }
@@ -312,14 +307,12 @@ public class MavenScmCli
             return;
         }
 
-        List updatedFiles = result.getUpdatedFiles();
+        List<ScmFile> updatedFiles = result.getUpdatedFiles();
 
         System.out.println( "Updated these files: " );
 
-        for ( Iterator it = updatedFiles.iterator(); it.hasNext(); )
+        for ( ScmFile file : updatedFiles )
         {
-            ScmFile file = (ScmFile) it.next();
-
             System.out.println( " " + file.getPath() );
         }
     }



Mime
View raw message