maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hbout...@apache.org
Subject svn commit: r1345425 - /maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java
Date Sat, 02 Jun 2012 03:40:06 GMT
Author: hboutemy
Date: Sat Jun  2 03:40:06 2012
New Revision: 1345425

URL: http://svn.apache.org/viewvc?rev=1345425&view=rev
Log:
use Java 5 for loops syntax

Modified:
    maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java

Modified: maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java?rev=1345425&r1=1345424&r2=1345425&view=diff
==============================================================================
--- maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java
(original)
+++ maven/plugins/trunk/maven-clean-plugin/src/main/java/org/apache/maven/plugin/clean/CleanMojo.java
Sat Jun  2 03:40:06 2012
@@ -174,10 +174,8 @@ public class CleanMojo
 
         try
         {
-            File[] directories = getDirectories();
-            for ( int i = 0; i < directories.length; i++ )
+            for ( File directory : getDirectories() )
             {
-                File directory = directories[i];
                 if ( directory != null )
                 {
                     cleaner.delete( directory, null, followSymLinks, failOnError, retryOnError
);
@@ -186,9 +184,8 @@ public class CleanMojo
 
             if ( filesets != null )
             {
-                for ( int i = 0; i < filesets.length; i++ )
+                for ( Fileset fileset : filesets )
                 {
-                    Fileset fileset = filesets[i];
                     if ( fileset.getDirectory() == null )
                     {
                         throw new MojoExecutionException( "Missing base directory for " +
fileset );



Mime
View raw message