maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1517354 [2/4] - in /maven/plugins/trunk: maven-acr-plugin/src/main/java/org/apache/maven/plugin/acr/ maven-ant-plugin/src/main/java/org/apache/maven/plugin/ant/ maven-ant-plugin/src/test/java/org/apache/maven/plugin/ant/stubs/ maven-antrun...
Date Sun, 25 Aug 2013 18:02:45 GMT
Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/AbstractLineAggregatingHandler.java Sun Aug 25 18:02:43 2013
@@ -158,7 +158,7 @@ public abstract class AbstractLineAggreg
         {
             reader = new BufferedReader( new InputStreamReader( fileInfo.getContents(), getEncoding() ) );
 
-            String line = null;
+            String line;
             while ( ( line = reader.readLine() ) != null )
             {
                 if ( !lines.contains( line ) )

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/ComponentsXmlArchiverFileFilter.java Sun Aug 25 18:02:43 2013
@@ -76,29 +76,22 @@ public class ComponentsXmlArchiverFileFi
         {
             final Xpp3Dom[] children = newDom.getChildren();
 
-            for ( int i = 0; i < children.length; i++ )
-            {
-                final Xpp3Dom component = children[i];
-
-                if ( components == null )
-                {
+            for (final Xpp3Dom component : children) {
+                if (components == null) {
                     components = new LinkedHashMap<String, Xpp3Dom>();
                 }
 
-                final String role = component.getChild( "role" )
-                                             .getValue();
-                final Xpp3Dom child = component.getChild( "role-hint" );
+                final String role = component.getChild("role")
+                        .getValue();
+                final Xpp3Dom child = component.getChild("role-hint");
                 final String roleHint = child != null ? child.getValue() : "";
 
                 final String key = role + roleHint;
-                if ( !components.containsKey( key ) )
-                {
-                    System.out.println( "Adding " + key );
-                    components.put( key, component );
-                }
-                else
-                {
-                    System.out.println( "Component: " + key + " is already defined. Skipping." );
+                if (!components.containsKey(key)) {
+                    System.out.println("Adding " + key);
+                    components.put(key, component);
+                } else {
+                    System.out.println("Component: " + key + " is already defined. Skipping.");
                 }
             }
         }
@@ -135,11 +128,8 @@ public class ComponentsXmlArchiverFileFi
                 final Xpp3Dom componentDom = new Xpp3Dom( "components" );
                 dom.addChild( componentDom );
 
-                for ( final Iterator<Xpp3Dom> i = components.values()
-                                                            .iterator(); i.hasNext(); )
-                {
-                    final Xpp3Dom component = i.next();
-                    componentDom.addChild( component );
+                for (final Xpp3Dom component : components.values()) {
+                    componentDom.addChild(component);
                 }
 
                 Xpp3DomWriter.write( fileWriter, dom );

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/filter/SimpleAggregatingDescriptorHandler.java Sun Aug 25 18:02:43 2013
@@ -109,11 +109,8 @@ public class SimpleAggregatingDescriptor
 
             writer.write( commentChars + " Aggregated on " + new Date() + " from: " );
 
-            for ( final Iterator<String> it = filenames.iterator(); it.hasNext(); )
-            {
-                final String filename = it.next();
-
-                writer.write( "\n" + commentChars + " " + filename );
+            for (final String filename : filenames) {
+                writer.write("\n" + commentChars + " " + filename);
             }
 
             writer.write( "\n\n" );

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/FileSetFormatter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/FileSetFormatter.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/FileSetFormatter.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/format/FileSetFormatter.java Sun Aug 25 18:02:43 2013
@@ -85,32 +85,24 @@ public class FileSetFormatter
                 formattedDir.mkdirs();
 
                 FileFormatter fileFormatter = new FileFormatter( configSource, logger );
-                for ( int i = 0; i < files.length; i++ )
-                {
-                    String file = files[i];
-                    
-                    logger.debug( "Filtering: " + file );
+                for (String file : files) {
+                    logger.debug("Filtering: " + file);
 
-                    File targetFile = new File( formattedDir, file );
+                    File targetFile = new File(formattedDir, file);
 
                     targetFile.getParentFile().mkdirs();
 
-                    File sourceFile = new File( fileSetDir, file );
-                    try
-                    {
+                    File sourceFile = new File(fileSetDir, file);
+                    try {
                         sourceFile =
-                            fileFormatter.format( sourceFile, set.isFiltered(), lineEndingHint, formattedDir,
-                                                  configSource.getEncoding() );
-                        AssemblyFileUtils.copyFile( sourceFile, targetFile );
-                    }
-                    catch ( AssemblyFormattingException e )
-                    {
-                        deleteDirectory( formattedDir );
+                                fileFormatter.format(sourceFile, set.isFiltered(), lineEndingHint, formattedDir,
+                                        configSource.getEncoding());
+                        AssemblyFileUtils.copyFile(sourceFile, targetFile);
+                    } catch (AssemblyFormattingException e) {
+                        deleteDirectory(formattedDir);
                         throw e;
-                    }
-                    catch ( IOException e )
-                    {
-                        deleteDirectory( formattedDir );
+                    } catch (IOException e) {
+                        deleteDirectory(formattedDir);
                         throw e;
                     }
                 }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/interpolation/AssemblyInterpolator.java Sun Aug 25 18:02:43 2013
@@ -132,11 +132,8 @@ public class AssemblyInterpolator
 
             @SuppressWarnings( "unchecked" )
             final List<ObjectInterpolationWarning> warnings = objectInterpolator.getWarnings();
-            for ( final Iterator<ObjectInterpolationWarning> it = warnings.iterator(); it.hasNext(); )
-            {
-                final ObjectInterpolationWarning warning = it.next();
-
-                sb.append( '\n' ).append( warning );
+            for (final ObjectInterpolationWarning warning : warnings) {
+                sb.append('\n').append(warning);
             }
 
             sb.append( "\n\nThese values were SKIPPED, but the assembly process will continue.\n" );

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReader.java Sun Aug 25 18:02:43 2013
@@ -112,19 +112,17 @@ public class DefaultAssemblyReader
         if ( ( descriptors != null ) && ( descriptors.length > 0 ) )
         {
             locator.setStrategies( strategies );
-            for ( int i = 0; i < descriptors.length; i++ )
-            {
-                getLogger().info( "Reading assembly descriptor: " + descriptors[i] );
-                addAssemblyFromDescriptor( descriptors[i], locator, configSource, assemblies );
+            for (String descriptor1 : descriptors) {
+                getLogger().info("Reading assembly descriptor: " + descriptor1);
+                addAssemblyFromDescriptor(descriptor1, locator, configSource, assemblies);
             }
         }
 
         if ( ( descriptorRefs != null ) && ( descriptorRefs.length > 0 ) )
         {
             locator.setStrategies( refStrategies );
-            for ( int i = 0; i < descriptorRefs.length; i++ )
-            {
-                addAssemblyForDescriptorReference( descriptorRefs[i], configSource, assemblies );
+            for (String descriptorRef : descriptorRefs) {
+                addAssemblyForDescriptorReference(descriptorRef, configSource, assemblies);
             }
         }
 
@@ -166,9 +164,8 @@ public class DefaultAssemblyReader
 
             if ( paths != null )
             {
-                for ( int i = 0; i < paths.length; i++ )
-                {
-                    addAssemblyFromDescriptor( paths[i], locator, configSource, assemblies );
+                for (String path : paths) {
+                    addAssemblyFromDescriptor(path, locator, configSource, assemblies);
                 }
             }
         }
@@ -187,12 +184,9 @@ public class DefaultAssemblyReader
 
         // check unique IDs
         final Set<String> ids = new HashSet<String>();
-        for ( final Iterator<Assembly> i = assemblies.iterator(); i.hasNext(); )
-        {
-            final Assembly assembly = i.next();
-            if ( !ids.add( assembly.getId() ) )
-            {
-                getLogger().warn( "The assembly id " + assembly.getId() + " is used more than once." );
+        for (final Assembly assembly : assemblies) {
+            if (!ids.add(assembly.getId())) {
+                getLogger().warn("The assembly id " + assembly.getId() + " is used more than once.");
             }
 
         }
@@ -467,50 +461,36 @@ public class DefaultAssemblyReader
 
         final List<String> componentLocations = assembly.getComponentDescriptors();
 
-        for ( final Iterator<String> it = componentLocations.iterator(); it.hasNext(); )
-        {
-            String location = it.next();
-
+        for (String location : componentLocations) {
             // allow expressions in path to component descriptor... MASSEMBLY-486
-            try
-            {
-                location = aee.evaluate( location ).toString();
-            }
-            catch ( final Exception eee )
-            {
-                getLogger().error( "Error interpolating componentDescriptor: " + location, eee );
+            try {
+                location = aee.evaluate(location).toString();
+            } catch (final Exception eee) {
+                getLogger().error("Error interpolating componentDescriptor: " + location, eee);
             }
 
-            final Location resolvedLocation = locator.resolve( location );
+            final Location resolvedLocation = locator.resolve(location);
 
-            if ( resolvedLocation == null )
-            {
-                throw new AssemblyReadException( "Failed to locate component descriptor: " + location );
+            if (resolvedLocation == null) {
+                throw new AssemblyReadException("Failed to locate component descriptor: " + location);
             }
 
             Component component = null;
             Reader reader = null;
-            try
-            {
-                reader = new InputStreamReader( resolvedLocation.getInputStream() );
-                component = new ComponentXpp3Reader().read( reader );
-            }
-            catch ( final IOException e )
-            {
-                throw new AssemblyReadException( "Error reading component descriptor: " + location + " (resolved to: "
-                    + resolvedLocation.getSpecification() + ")", e );
-            }
-            catch ( final XmlPullParserException e )
-            {
-                throw new AssemblyReadException( "Error reading component descriptor: " + location + " (resolved to: "
-                    + resolvedLocation.getSpecification() + ")", e );
-            }
-            finally
-            {
-                IOUtil.close( reader );
+            try {
+                reader = new InputStreamReader(resolvedLocation.getInputStream());
+                component = new ComponentXpp3Reader().read(reader);
+            } catch (final IOException e) {
+                throw new AssemblyReadException("Error reading component descriptor: " + location + " (resolved to: "
+                        + resolvedLocation.getSpecification() + ")", e);
+            } catch (final XmlPullParserException e) {
+                throw new AssemblyReadException("Error reading component descriptor: " + location + " (resolved to: "
+                        + resolvedLocation.getSpecification() + ")", e);
+            } finally {
+                IOUtil.close(reader);
             }
 
-            mergeComponentWithAssembly( component, assembly );
+            mergeComponentWithAssembly(component, assembly);
         }
     }
 
@@ -525,45 +505,32 @@ public class DefaultAssemblyReader
         final List<ContainerDescriptorHandlerConfig> containerHandlerDescriptors =
             component.getContainerDescriptorHandlers();
 
-        for ( final Iterator<ContainerDescriptorHandlerConfig> it = containerHandlerDescriptors.iterator(); it.hasNext(); )
-        {
-            final ContainerDescriptorHandlerConfig cfg = it.next();
-            assembly.addContainerDescriptorHandler( cfg );
+        for (final ContainerDescriptorHandlerConfig cfg : containerHandlerDescriptors) {
+            assembly.addContainerDescriptorHandler(cfg);
         }
 
         final List<DependencySet> dependencySetList = component.getDependencySets();
 
-        for ( final Iterator<DependencySet> it = dependencySetList.iterator(); it.hasNext(); )
-        {
-            final DependencySet dependencySet = it.next();
-            assembly.addDependencySet( dependencySet );
+        for (final DependencySet dependencySet : dependencySetList) {
+            assembly.addDependencySet(dependencySet);
         }
 
         final List<FileSet> fileSetList = component.getFileSets();
 
-        for ( final Iterator<FileSet> it = fileSetList.iterator(); it.hasNext(); )
-        {
-            final FileSet fileSet = it.next();
-
-            assembly.addFileSet( fileSet );
+        for (final FileSet fileSet : fileSetList) {
+            assembly.addFileSet(fileSet);
         }
 
         final List<FileItem> fileList = component.getFiles();
 
-        for ( final Iterator<FileItem> it = fileList.iterator(); it.hasNext(); )
-        {
-            final FileItem fileItem = it.next();
-
-            assembly.addFile( fileItem );
+        for (final FileItem fileItem : fileList) {
+            assembly.addFile(fileItem);
         }
 
         final List<Repository> repositoriesList = component.getRepositories();
 
-        for ( final Iterator<Repository> it = repositoriesList.iterator(); it.hasNext(); )
-        {
-            final Repository repository = it.next();
-
-            assembly.addRepository( repository );
+        for (final Repository repository : repositoriesList) {
+            assembly.addRepository(repository);
         }
 
         final List<ModuleSet> moduleSets = component.getModuleSets();

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/AbstractAssemblyMojo.java Sun Aug 25 18:02:43 2013
@@ -414,96 +414,72 @@ public abstract class AbstractAssemblyMo
         // TODO: how, might we plug this into an installer, such as NSIS?
 
         boolean warnedAboutMainProjectArtifact = false;
-        for ( final Iterator<Assembly> assemblyIterator = assemblies.iterator(); assemblyIterator.hasNext(); )
-        {
-            final Assembly assembly = assemblyIterator.next();
-            try
-            {
-                final String fullName = AssemblyFormatUtils.getDistributionName( assembly, this );
-                
+        for (final Assembly assembly : assemblies) {
+            try {
+                final String fullName = AssemblyFormatUtils.getDistributionName(assembly, this);
+
                 List<String> effectiveFormats = formats;
-                if ( effectiveFormats == null || effectiveFormats.size() == 0 )
-                {
+                if (effectiveFormats == null || effectiveFormats.size() == 0) {
                     effectiveFormats = assembly.getFormats();
                 }
-                if ( effectiveFormats == null || effectiveFormats.size() == 0 ) 
-                {
-                    throw new MojoFailureException( "No formats specified in the execution parameters or the assembly descriptor." );
+                if (effectiveFormats == null || effectiveFormats.size() == 0) {
+                    throw new MojoFailureException("No formats specified in the execution parameters or the assembly descriptor.");
                 }
 
-                for ( final String format : effectiveFormats )
-                {
+                for (final String format : effectiveFormats) {
                     final File destFile =
-                        assemblyArchiver.createArchive( assembly, fullName, format, this, isRecompressZippedFiles() );
+                            assemblyArchiver.createArchive(assembly, fullName, format, this, isRecompressZippedFiles());
 
                     final MavenProject project = getProject();
                     final String classifier = getClassifier();
                     final String type = project.getArtifact()
-                                               .getType();
+                            .getType();
 
-                    if ( attach && destFile.isFile() )
-                    {
-                        if ( isAssemblyIdAppended() )
-                        {
-                            projectHelper.attachArtifact( project, format, assembly.getId(), destFile );
-                        }
-                        else if ( classifier != null )
-                        {
-                            projectHelper.attachArtifact( project, format, classifier, destFile );
-                        }
-                        else if ( !"pom".equals( type ) && format.equals( type ) )
-                        {
-                            if ( !warnedAboutMainProjectArtifact )
-                            {
+                    if (attach && destFile.isFile()) {
+                        if (isAssemblyIdAppended()) {
+                            projectHelper.attachArtifact(project, format, assembly.getId(), destFile);
+                        } else if (classifier != null) {
+                            projectHelper.attachArtifact(project, format, classifier, destFile);
+                        } else if (!"pom".equals(type) && format.equals(type)) {
+                            if (!warnedAboutMainProjectArtifact) {
                                 final StringBuilder message = new StringBuilder();
 
-                                message.append( "Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing." );
-                                message.append( "\nInstead of attaching the assembly file: " )
-                                       .append( destFile )
-                                       .append( ", it will become the file for main project artifact." );
-                                message.append( "\nNOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!" );
+                                message.append("Configuration options: 'appendAssemblyId' is set to false, and 'classifier' is missing.");
+                                message.append("\nInstead of attaching the assembly file: ")
+                                        .append(destFile)
+                                        .append(", it will become the file for main project artifact.");
+                                message.append("\nNOTE: If multiple descriptors or descriptor-formats are provided for this project, the value of this file will be non-deterministic!");
 
-                                getLog().warn( message );
+                                getLog().warn(message);
                                 warnedAboutMainProjectArtifact = true;
                             }
 
                             final File existingFile = project.getArtifact()
-                                                             .getFile();
-                            if ( ( existingFile != null ) && existingFile.exists() )
-                            {
-                                getLog().warn( "Replacing pre-existing project main-artifact file: " + existingFile
-                                                               + "\nwith assembly file: " + destFile );
+                                    .getFile();
+                            if ((existingFile != null) && existingFile.exists()) {
+                                getLog().warn("Replacing pre-existing project main-artifact file: " + existingFile
+                                        + "\nwith assembly file: " + destFile);
                             }
 
                             project.getArtifact()
-                                   .setFile( destFile );
-                        }
-                        else
-                        {
-                            projectHelper.attachArtifact( project, format, null, destFile );
+                                    .setFile(destFile);
+                        } else {
+                            projectHelper.attachArtifact(project, format, null, destFile);
                         }
-                    }
-                    else if ( attach )
-                    {
-                        getLog().warn( "Assembly file: "
-                                                       + destFile
-                                                       + " is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment." );
+                    } else if (attach) {
+                        getLog().warn("Assembly file: "
+                                + destFile
+                                + " is not a regular file (it may be a directory). It cannot be attached to the project build for installation or deployment.");
                     }
                 }
-            }
-            catch ( final ArchiveCreationException e )
-            {
-                throw new MojoExecutionException( "Failed to create assembly: " + e.getMessage(), e );
-            }
-            catch ( final AssemblyFormattingException e )
-            {
-                throw new MojoExecutionException( "Failed to create assembly: " + e.getMessage(), e );
-            }
-            catch ( final InvalidAssemblerConfigurationException e )
-            {
-                throw new MojoFailureException( assembly, "Assembly is incorrectly configured: " + assembly.getId(),
-                                                "Assembly: " + assembly.getId() + " is not configured correctly: "
-                                                                + e.getMessage() );
+            } catch (final ArchiveCreationException e) {
+                throw new MojoExecutionException("Failed to create assembly: " + e.getMessage(), e);
+            } catch (final AssemblyFormattingException e) {
+                throw new MojoExecutionException("Failed to create assembly: " + e.getMessage(), e);
+            } catch (final InvalidAssemblerConfigurationException e) {
+                throw new MojoFailureException(assembly, "Assembly is incorrectly configured: " + assembly.getId(),
+                        "Assembly: " + assembly.getId() + " is not configured correctly: "
+                                + e.getMessage());
             }
         }
     }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/mojos/UnpackMojo.java Sun Aug 25 18:02:43 2013
@@ -88,38 +88,26 @@ public class UnpackMojo
             dependencies.addAll( projectArtifacts );
         }
 
-        for ( final Iterator<Artifact> j = dependencies.iterator(); j.hasNext(); )
-        {
-            final Artifact artifact = j.next();
-
+        for (final Artifact artifact : dependencies) {
             final String name = artifact.getFile().getName();
 
-            final File tempLocation = new File( workDirectory, name.substring( 0, name.lastIndexOf( '.' ) ) );
+            final File tempLocation = new File(workDirectory, name.substring(0, name.lastIndexOf('.')));
             boolean process = false;
-            if ( !tempLocation.exists() )
-            {
+            if (!tempLocation.exists()) {
                 tempLocation.mkdirs();
                 process = true;
-            }
-            else if ( artifact.getFile().lastModified() > tempLocation.lastModified() )
-            {
+            } else if (artifact.getFile().lastModified() > tempLocation.lastModified()) {
                 process = true;
             }
 
-            if ( process )
-            {
+            if (process) {
                 final File file = artifact.getFile();
-                try
-                {
-                    AssemblyFileUtils.unpack( file, tempLocation, archiverManager );
-                }
-                catch ( final NoSuchArchiverException e )
-                {
-                    getLog().info( "Skip unpacking dependency file with unknown extension: " + file.getPath() );
-                }
-                catch ( final ArchiveExpansionException e )
-                {
-                    throw new MojoExecutionException( "Error unpacking dependency file: " + file, e );
+                try {
+                    AssemblyFileUtils.unpack(file, tempLocation, archiverManager);
+                } catch (final NoSuchArchiverException e) {
+                    getLog().info("Skip unpacking dependency file with unknown extension: " + file.getPath());
+                } catch (final ArchiveExpansionException e) {
+                    throw new MojoExecutionException("Error unpacking dependency file: " + file, e);
                 }
             }
         }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFileUtils.java Sun Aug 25 18:02:43 2013
@@ -192,7 +192,7 @@ public final class AssemblyFileUtils
                 }
             }
         }
-        else if ( atEndOfFile.booleanValue() == true )
+        else if (atEndOfFile == true )
         {
             eofChars = lineEndings;
         }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/AssemblyFormatUtils.java Sun Aug 25 18:02:43 2013
@@ -503,7 +503,7 @@ public final class AssemblyFormatUtils
                 finalSep = sep;
             }
             
-            if ( value.indexOf( "." + sep ) > -1 )
+            if (value.contains("." + sep))
             {
                 List<String> parts = new ArrayList<String>();
                 parts.addAll( Arrays.asList( value.split( sep ) ) );

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/FilterUtils.java Sun Aug 25 18:02:43 2013
@@ -80,13 +80,9 @@ public final class FilterUtils
             }
         }
 
-        for ( final Iterator<PatternIncludesArtifactFilter> it = allFilters.iterator(); it.hasNext(); )
-        {
-            final ArtifactFilter f = it.next();
-
-            if ( f instanceof StatisticsReportingArtifactFilter )
-            {
-                ( (StatisticsReportingArtifactFilter) f ).reportMissedCriteria( logger );
+        for (final PatternIncludesArtifactFilter f : allFilters) {
+            if (f instanceof StatisticsReportingArtifactFilter) {
+                ((StatisticsReportingArtifactFilter) f).reportMissedCriteria(logger);
             }
         }
     }
@@ -153,18 +149,13 @@ public final class FilterUtils
 
         reportFilteringStatistics( allFilters, logger );
 
-        for ( final Iterator<ArtifactFilter> it = allFilters.iterator(); it.hasNext(); )
-        {
-            final ArtifactFilter f = it.next();
-
-            if ( f instanceof StatisticsReportingArtifactFilter )
-            {
+        for (final ArtifactFilter f : allFilters) {
+            if (f instanceof StatisticsReportingArtifactFilter) {
                 final StatisticsReportingArtifactFilter sFilter = (StatisticsReportingArtifactFilter) f;
 
-                if ( strictFiltering && sFilter.hasMissedCriteria() )
-                {
+                if (strictFiltering && sFilter.hasMissedCriteria()) {
                     throw new InvalidAssemblerConfigurationException(
-                                                                      "One or more filters had unmatched criteria. Check debug log for more information." );
+                            "One or more filters had unmatched criteria. Check debug log for more information.");
                 }
             }
         }
@@ -172,21 +163,16 @@ public final class FilterUtils
 
     public static void reportFilteringStatistics( final Collection<ArtifactFilter> filters, final Logger logger )
     {
-        for ( final Iterator<ArtifactFilter> it = filters.iterator(); it.hasNext(); )
-        {
-            final ArtifactFilter f = it.next();
-
-            if ( f instanceof StatisticsReportingArtifactFilter )
-            {
+        for (final ArtifactFilter f : filters) {
+            if (f instanceof StatisticsReportingArtifactFilter) {
                 final StatisticsReportingArtifactFilter sFilter = (StatisticsReportingArtifactFilter) f;
 
-                if ( logger.isDebugEnabled() )
-                {
-                    logger.debug( "Statistics for " + sFilter + "\n" );
+                if (logger.isDebugEnabled()) {
+                    logger.debug("Statistics for " + sFilter + "\n");
                 }
 
-                sFilter.reportMissedCriteria( logger );
-                sFilter.reportFilteredArtifacts( logger );
+                sFilter.reportMissedCriteria(logger);
+                sFilter.reportFilteredArtifacts(logger);
             }
         }
     }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/main/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtils.java Sun Aug 25 18:02:43 2013
@@ -58,7 +58,7 @@ public final class TypeConversionUtils
 
         if ( ( list != null ) && !list.isEmpty() )
         {
-            result = list.toArray( new String[0] );
+            result = list.toArray(new String[list.size()]);
         }
 
         return result;

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/ManifestCreationFinalizerTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/ManifestCreationFinalizerTest.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/ManifestCreationFinalizerTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/ManifestCreationFinalizerTest.java Sun Aug 25 18:02:43 2013
@@ -109,7 +109,7 @@ public class ManifestCreationFinalizerTe
 
         IOUtil.copy( reader, writer );
 
-        assertTrue( writer.toString().indexOf( "Main-Class: Stuff" ) > -1 );
+        assertTrue(writer.toString().contains("Main-Class: Stuff"));
 
         // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4823678
         ( (JarURLConnection) resource.openConnection() ).getJarFile().close();
@@ -149,7 +149,7 @@ public class ManifestCreationFinalizerTe
 
         System.out.println( "Test Manifest:\n\n" + writer );
 
-        assertTrue( writer.toString().indexOf( testKey + ": " + testValue ) > -1 );
+        assertTrue(writer.toString().contains(testKey + ": " + testValue));
 
         // http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4823678
         ( (JarURLConnection) resource.openConnection() ).getJarFile().close();

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/phase/ModuleSetAssemblyPhaseTest.java Sun Aug 25 18:02:43 2013
@@ -961,11 +961,8 @@ public class ModuleSetAssemblyPhaseTest
 
             System.out.println( "Unexpected projects in output: " );
 
-            for ( final Iterator<MavenProject> iter = checkTooMany.iterator(); iter.hasNext(); )
-            {
-                final MavenProject project = iter.next();
-
-                System.out.println( project.getId() );
+            for (final MavenProject project : checkTooMany) {
+                System.out.println(project.getId());
             }
         }
 
@@ -978,11 +975,8 @@ public class ModuleSetAssemblyPhaseTest
 
             System.out.println( "Expected projects missing from output: " );
 
-            for ( final Iterator<MavenProject> iter = checkTooMany.iterator(); iter.hasNext(); )
-            {
-                final MavenProject project = iter.next();
-
-                System.out.println( project.getId() );
+            for (final MavenProject project : checkTooMany) {
+                System.out.println(project.getId());
             }
         }
 

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/archive/task/testutils/ArtifactMock.java Sun Aug 25 18:02:43 2013
@@ -244,7 +244,7 @@ public class ArtifactMock
             artifact.isSnapshot();
             artifactCtl.setReturnValue( snapshot, MockControl.ZERO_OR_MORE );
 
-            isSnapshot = Boolean.valueOf( snapshot );
+            isSnapshot = snapshot;
         }
     }
 

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolverTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolverTest.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolverTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/artifact/DefaultDependencyResolverTest.java Sun Aug 25 18:02:43 2013
@@ -594,11 +594,8 @@ public class DefaultDependencyResolverTe
         else
         {
             boolean found = false;
-            for ( final Iterator<ArtifactRepository> it = repos.iterator(); it.hasNext(); )
-            {
-                final ArtifactRepository repo = it.next();
-                if ( repoId.equals( repo.getId() ) )
-                {
+            for (final ArtifactRepository repo : repos) {
+                if (repoId.equals(repo.getId())) {
                     found = true;
                     break;
                 }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/io/DefaultAssemblyReaderTest.java Sun Aug 25 18:02:43 2013
@@ -1022,7 +1022,7 @@ public class DefaultAssemblyReaderTest
         final List<String> files = writeAssembliesToFile( assemblies, basedir );
 
         final List<Assembly> results =
-            performReadAssemblies( basedir, null, null, files.toArray( new String[0] ), null, null );
+            performReadAssemblies( basedir, null, null, files.toArray(new String[files.size()]), null, null );
 
         assertNotNull( results );
         assertEquals( 2, results.size() );
@@ -1125,24 +1125,18 @@ public class DefaultAssemblyReaderTest
     {
         final List<String> files = new ArrayList<String>();
 
-        for ( final Iterator<Assembly> it = assemblies.iterator(); it.hasNext(); )
-        {
-            final Assembly assembly = it.next();
-
-            final File assemblyFile = new File( dir, assembly.getId() + ".xml" );
+        for (final Assembly assembly : assemblies) {
+            final File assemblyFile = new File(dir, assembly.getId() + ".xml");
 
             Writer writer = null;
-            try
-            {
-                writer = new OutputStreamWriter( new FileOutputStream( assemblyFile ), "UTF-8" );
-                new AssemblyXpp3Writer().write( writer, assembly );
-            }
-            finally
-            {
-                IOUtil.close( writer );
+            try {
+                writer = new OutputStreamWriter(new FileOutputStream(assemblyFile), "UTF-8");
+                new AssemblyXpp3Writer().write(writer, assembly);
+            } finally {
+                IOUtil.close(writer);
             }
 
-            files.add( assemblyFile.getAbsolutePath() );
+            files.add(assemblyFile.getAbsolutePath());
         }
 
         return files;

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/MockManager.java Sun Aug 25 18:02:43 2013
@@ -44,30 +44,21 @@ public class MockManager
 
     public void replayAll()
     {
-        for ( final Iterator<MockControl> it = mockControls.iterator(); it.hasNext(); )
-        {
-            final MockControl control = it.next();
-
+        for (final MockControl control : mockControls) {
             control.replay();
         }
     }
 
     public void verifyAll()
     {
-        for ( final Iterator<MockControl> it = mockControls.iterator(); it.hasNext(); )
-        {
-            final MockControl control = it.next();
-
-            try
-            {
+        for (final MockControl control : mockControls) {
+            try {
                 control.verify();
-            }
-            catch ( final AssertionFailedError err )
-            {
+            } catch (final AssertionFailedError err) {
                 final String message =
-                    "MockControl: " + control + " of: " + control.getMock() + " failed.\n" + err.getMessage();
-                final AssertionFailedError e = new AssertionFailedError( message );
-                e.initCause( err );
+                        "MockControl: " + control + " of: " + control.getMock() + " failed.\n" + err.getMessage();
+                final AssertionFailedError e = new AssertionFailedError(message);
+                e.initCause(err);
 
                 throw e;
             }

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/testutils/TestUtils.java Sun Aug 25 18:02:43 2013
@@ -63,7 +63,7 @@ public final class TestUtils
 
         BufferedReader reader = new BufferedReader( new FileReader( file ) ); // platform encoding
 
-        String line = null;
+        String line;
 
         while( ( line = reader.readLine() ) != null )
         {

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/ProjectUtilsTest.java Sun Aug 25 18:02:43 2013
@@ -197,27 +197,21 @@ public class ProjectUtilsTest
 
         final List<MavenProject> unexpected = new ArrayList<MavenProject>();
 
-        for ( final Iterator<MavenProject> it = result.iterator(); it.hasNext(); )
-        {
-            final MavenProject project = it.next();
-
+        for (final MavenProject project : result) {
             boolean removed = false;
 
-            for ( final Iterator<MavenProject> verifyIterator = verifyCopy.iterator(); verifyIterator.hasNext(); )
-            {
+            for (final Iterator<MavenProject> verifyIterator = verifyCopy.iterator(); verifyIterator.hasNext(); ) {
                 final MavenProject verification = verifyIterator.next();
 
-                if ( verification.getId()
-                                 .equals( project.getId() ) )
-                {
+                if (verification.getId()
+                        .equals(project.getId())) {
                     verifyIterator.remove();
                     removed = true;
                 }
             }
 
-            if ( !removed )
-            {
-                unexpected.add( project );
+            if (!removed) {
+                unexpected.add(project);
             }
         }
 

Modified: maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java (original)
+++ maven/plugins/trunk/maven-assembly-plugin/src/test/java/org/apache/maven/plugin/assembly/utils/TypeConversionUtilsTest.java Sun Aug 25 18:02:43 2013
@@ -37,8 +37,7 @@ public class TypeConversionUtilsTest
 
     public void testModeToInt_InterpretAsOctalWithoutLeadingZero() throws AssemblyFormattingException
     {
-        final int check = Integer.decode( "0777" )
-                                 .intValue();
+        final int check = Integer.decode("0777");
         final int test = TypeConversionUtils.modeToInt( "777", new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ) );
 
         assertEquals( check, test );
@@ -46,8 +45,7 @@ public class TypeConversionUtilsTest
 
     public void testModeToInt_InterpretValuesWithLeadingZeroAsOctal() throws AssemblyFormattingException
     {
-        final int check = Integer.decode( "0777" )
-                                 .intValue();
+        final int check = Integer.decode("0777");
         final int test = TypeConversionUtils.modeToInt( "0777", new ConsoleLogger( Logger.LEVEL_DEBUG, "test" ) );
 
         assertEquals( check, test );
@@ -117,11 +115,8 @@ public class TypeConversionUtilsTest
         {
             final String message = new String( baos.toByteArray() );
 
-            for ( final Iterator<String> it = messagesToCheckIfInsane.iterator(); it.hasNext(); )
-            {
-                final String checkMessage = it.next();
-
-                assertTrue( "\'" + checkMessage + "\' is not present in output.", message.indexOf( checkMessage ) > -1 );
+            for (final String checkMessage : messagesToCheckIfInsane) {
+                assertTrue("\'" + checkMessage + "\' is not present in output.", message.contains(checkMessage));
             }
         }
     }

Modified: maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java (original)
+++ maven/plugins/trunk/maven-changelog-plugin/src/main/java/org/apache/maven/plugin/changelog/ChangeLogReport.java Sun Aug 25 18:02:43 2013
@@ -1565,7 +1565,7 @@ public class ChangeLogReport
      */
     protected void generateLinks( String connection, String name, String revision, Sink sink )
     {
-        String linkFile = null;
+        String linkFile;
         String linkRev = null;
 
         if ( revision != null )

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/AnnouncementMailMojo.java Sun Aug 25 18:02:43 2013
@@ -266,33 +266,27 @@ public class AnnouncementMailMojo
             mailMsg.setContentType( this.mailContentType );
             mailMsg.setFrom( fromAddress, fromName );
 
-            final Iterator it = getToAddresses().iterator();
-            while ( it.hasNext() )
-            {
-                email = it.next().toString();
-                getLog().info( "Sending mail to " + email + "..." );
-                mailMsg.addTo( email, "" );
+            for (Object o1 : getToAddresses()) {
+                email = o1.toString();
+                getLog().info("Sending mail to " + email + "...");
+                mailMsg.addTo(email, "");
             }
 
             if ( getCcAddresses() != null )
             {
-                final Iterator it2 = getCcAddresses().iterator();
-                while ( it2.hasNext() )
-                {
-                    email = it2.next().toString();
-                    getLog().info( "Sending cc mail to " + email + "..." );
-                    mailMsg.addCc( email, "" );
+                for (Object o : getCcAddresses()) {
+                    email = o.toString();
+                    getLog().info("Sending cc mail to " + email + "...");
+                    mailMsg.addCc(email, "");
                 }
             }
 
             if ( getBccAddresses() != null )
             {
-                final Iterator it3 = getBccAddresses().iterator();
-                while ( it3.hasNext() )
-                {
-                    email = it3.next().toString();
-                    getLog().info( "Sending bcc mail to " + email + "..." );
-                    mailMsg.addBcc( email, "" );
+                for (Object o : getBccAddresses()) {
+                    email = o.toString();
+                    getLog().info("Sending bcc mail to " + email + "...");
+                    mailMsg.addBcc(email, "");
                 }
             }
 
@@ -375,14 +369,11 @@ public class AnnouncementMailMojo
         }
         else
         {
-            final Iterator it = from.iterator();
-            while ( it.hasNext() )
-            {
-                Developer developer = (Developer) it.next();
+            for (Object aFrom : from) {
+                Developer developer = (Developer) aFrom;
 
-                if ( fromDeveloperId.equals( developer.getId() ) )
-                {
-                    return new MailSender( developer.getName(), developer.getEmail() );
+                if (fromDeveloperId.equals(developer.getId())) {
+                    return new MailSender(developer.getName(), developer.getEmail());
                 }
             }
             throw new MojoExecutionException(

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/mailsender/ProjectJavamailMailSender.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/mailsender/ProjectJavamailMailSender.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/mailsender/ProjectJavamailMailSender.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/announcement/mailsender/ProjectJavamailMailSender.java Sun Aug 25 18:02:43 2013
@@ -106,13 +106,12 @@ public class ProjectJavamailMailSender
         }
         if ( userProperties != null )
         {
-            for ( Iterator i = userProperties.keySet().iterator(); i.hasNext(); )
-            {
-                String key = (String) i.next();
+            for (Object o : userProperties.keySet()) {
+                String key = (String) o;
 
-                String value = userProperties.getProperty( key );
+                String value = userProperties.getProperty(key);
 
-                props.put( key, value );
+                props.put(key, value);
             }
         }
     }
@@ -153,10 +152,9 @@ public class ProjectJavamailMailSender
             {
                 InternetAddress[] addressTo = new InternetAddress[mail.getToAddresses().size()];
                 int count = 0;
-                for ( Iterator i = mail.getToAddresses().iterator(); i.hasNext(); )
-                {
-                    String address = ( (MailMessage.Address) i.next() ).getRfc2822Address();
-                    addressTo[count++] = new InternetAddress( address );
+                for (Object o : mail.getToAddresses()) {
+                    String address = ((MailMessage.Address) o).getRfc2822Address();
+                    addressTo[count++] = new InternetAddress(address);
                 }
                 msg.setRecipients( Message.RecipientType.TO, addressTo );
             }
@@ -165,10 +163,9 @@ public class ProjectJavamailMailSender
             {
                 InternetAddress[] addressCc = new InternetAddress[mail.getCcAddresses().size()];
                 int count = 0;
-                for ( Iterator i = mail.getCcAddresses().iterator(); i.hasNext(); )
-                {
-                    String address = ( (MailMessage.Address) i.next() ).getRfc2822Address();
-                    addressCc[count++] = new InternetAddress( address );
+                for (Object o : mail.getCcAddresses()) {
+                    String address = ((MailMessage.Address) o).getRfc2822Address();
+                    addressCc[count++] = new InternetAddress(address);
                 }
                 msg.setRecipients( Message.RecipientType.CC, addressCc );
             }
@@ -177,10 +174,9 @@ public class ProjectJavamailMailSender
             {
                 InternetAddress[] addressBcc = new InternetAddress[mail.getBccAddresses().size()];
                 int count = 0;
-                for ( Iterator i = mail.getBccAddresses().iterator(); i.hasNext(); )
-                {
-                    String address = ( (MailMessage.Address) i.next() ).getRfc2822Address();
-                    addressBcc[count++] = new InternetAddress( address );
+                for (Object o : mail.getBccAddresses()) {
+                    String address = ((MailMessage.Address) o).getRfc2822Address();
+                    addressBcc[count++] = new InternetAddress(address);
                 }
                 msg.setRecipients( Message.RecipientType.BCC, addressBcc );
             }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/AbstractChangesMojo.java Sun Aug 25 18:02:43 2013
@@ -69,7 +69,7 @@ public abstract class AbstractChangesMoj
     {
         getLog().debug( "Root Folder:" + mavenSession.getExecutionRootDirectory() );
         getLog().debug( "Current Folder:" + basedir );
-        boolean result = mavenSession.getExecutionRootDirectory().equalsIgnoreCase( basedir.toString() );
+        boolean result = mavenSession.getExecutionRootDirectory().equalsIgnoreCase(basedir);
         if ( result )
         {
             getLog().debug( "This is the execution root." );

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesMojo.java Sun Aug 25 18:02:43 2013
@@ -266,14 +266,12 @@ public class ChangesMojo
             final String relativePath = absolutePath.substring( basePath.length() );
 
             List releaseList = changesXml.getReleaseList();
-            for ( Iterator iterator = project.getCollectedProjects().iterator(); iterator.hasNext(); )
-            {
-                final MavenProject childProject = (MavenProject) iterator.next();
-                final File changesFile = new File( childProject.getBasedir(), relativePath );
-                final ChangesXML childXml = getChangesFromFile( changesFile, childProject, additionalProperties );
-                if ( childXml != null )
-                {
-                    releaseList = releaseUtils.mergeReleases( releaseList, childProject.getName(), childXml.getReleaseList() );
+            for (Object o : project.getCollectedProjects()) {
+                final MavenProject childProject = (MavenProject) o;
+                final File changesFile = new File(childProject.getBasedir(), relativePath);
+                final ChangesXML childXml = getChangesFromFile(changesFile, childProject, additionalProperties);
+                if (childXml != null) {
+                    releaseList = releaseUtils.mergeReleases(releaseList, childProject.getName(), childXml.getReleaseList());
                 }
             }
             changesXml.setReleaseList( releaseList );
@@ -462,10 +460,9 @@ public class ChangesMojo
         try
         {
             getLog().debug( "Copying static resources." );
-            for ( int i = 0; i < resourceNames.length; i++ )
-            {
-                URL url = this.getClass().getClassLoader().getResource( pluginResourcesBase + "/" + resourceNames[i] );
-                FileUtils.copyURLToFile( url, new File( getReportOutputDirectory(), resourceNames[i] ) );
+            for (String resourceName : resourceNames) {
+                URL url = this.getClass().getClassLoader().getResource(pluginResourcesBase + "/" + resourceName);
+                FileUtils.copyURLToFile(url, new File(getReportOutputDirectory(), resourceName));
             }
         }
         catch ( IOException e )
@@ -494,11 +491,9 @@ public class ChangesMojo
             }
             else
             {
-                Iterator iterator = issueLinkTemplatePerSystem.entrySet().iterator();
-                while ( iterator.hasNext() )
-                {
-                    Map.Entry entry = (Map.Entry) iterator.next();
-                    getLog().debug( "issueLinkTemplatePerSystem[" + entry.getKey() + "] = " + entry.getValue() );
+                for (Object o : issueLinkTemplatePerSystem.entrySet()) {
+                    Map.Entry entry = (Map.Entry) o;
+                    getLog().debug("issueLinkTemplatePerSystem[" + entry.getKey() + "] = " + entry.getValue());
                 }
             }
         }

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ChangesReportGenerator.java Sun Aug 25 18:02:43 2013
@@ -205,7 +205,7 @@ public class ChangesReportGenerator exte
         }
 
         // If the %URL% token is used then the issue management system URL must be set.
-        if ( issueLink.indexOf( URL_TOKEN ) >= 0 && StringUtils.isBlank( getUrl() ) )
+        if (issueLink.contains(URL_TOKEN) && StringUtils.isBlank( getUrl() ) )
         {
             return false;
         }
@@ -328,10 +328,9 @@ public class ChangesReportGenerator exte
             namesEmailMap.put(action.getDueTo(), action.getDueToEmail());
         }
 
-        for ( Iterator iterator = dueTos.iterator(); iterator.hasNext(); )
-        {
-            DueTo dueTo = (DueTo) iterator.next();
-            namesEmailMap.put( dueTo.getName(), dueTo.getEmail() );
+        for (Object dueTo1 : dueTos) {
+            DueTo dueTo = (DueTo) dueTo1;
+            namesEmailMap.put(dueTo.getName(), dueTo.getEmail());
         }
 
         if ( namesEmailMap.isEmpty() )
@@ -464,17 +463,16 @@ public class ChangesReportGenerator exte
 
         sink.tableRow_();
 
-        for ( int idx = 0; idx < releaseList.size(); idx++ )
-        {
-            Release release = (Release) releaseList.get( idx );
+        for (Object aReleaseList : releaseList) {
+            Release release = (Release) aReleaseList;
 
             sink.tableRow();
 
-            sinkCellLink( sink, release.getVersion(), "#" + HtmlTools.encodeId( release.getVersion() ) );
+            sinkCellLink(sink, release.getVersion(), "#" + HtmlTools.encodeId(release.getVersion()));
 
-            sinkCell( sink, release.getDateRelease() );
+            sinkCell(sink, release.getDateRelease());
 
-            sinkCell( sink, release.getDescription() );
+            sinkCell(sink, release.getDescription());
 
             sink.tableRow_();
         }
@@ -505,10 +503,9 @@ public class ChangesReportGenerator exte
      */
     private void constructReleases( Sink sink, ResourceBundle bundle, List releaseList )
     {
-        for ( int idx = 0; idx < releaseList.size(); idx++ )
-        {
-            Release release = (Release) releaseList.get(idx);
-            constructRelease( sink, bundle, release );
+        for (Object aReleaseList : releaseList) {
+            Release release = (Release) aReleaseList;
+            constructRelease(sink, bundle, release);
         }
     }
 
@@ -642,7 +639,7 @@ public class ChangesReportGenerator exte
         String parseLink;
         String issueLink = (String) this.issueLinksPerSystem.get( system );
         parseLink = issueLink.replaceFirst( ISSUE_TOKEN, issue );
-        if ( parseLink.indexOf( URL_TOKEN ) >= 0 )
+        if (parseLink.contains(URL_TOKEN))
         {
             String url = this.url.substring( 0, this.url.lastIndexOf( "/" ) );
             parseLink = parseLink.replaceFirst( URL_TOKEN, url );

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/IssueAdapter.java Sun Aug 25 18:02:43 2013
@@ -117,7 +117,7 @@ public class IssueAdapter
         action.setIssue( issue.getKey() );
 
         // Try to map the IMS-specific issue type to one that is used in a changes.xml file
-        IssueType type = null;
+        IssueType type;
         if ( getIssueTypeMap().containsKey( issue.getType() ) )
         {
             type = getIssueTypeMap().get( issue.getType() );

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/changes/ReleaseUtils.java Sun Aug 25 18:02:43 2013
@@ -192,10 +192,9 @@ public class ReleaseUtils
 
         // Loop through the List of releases from changes.xml and casting each
         // release to a Release
-        for ( Iterator iterator = changesReleases.iterator(); iterator.hasNext(); )
-        {
-            Release release = (Release) iterator.next();
-            releases.add( release );
+        for (Object changesRelease : changesReleases) {
+            Release release = (Release) changesRelease;
+            releases.add(release);
         }
         return releases;
     }
@@ -225,28 +224,25 @@ public class ReleaseUtils
 
         if ( releases != null )
         {
-            for ( Iterator iterator = releases.iterator(); iterator.hasNext(); )
-            {
-                final Release release = (Release) iterator.next();
-                final Release componentRelease = getRelease( componentReleases, release.getVersion() );
-                if ( componentRelease != null ) {
-                    release.addComponent( componentName, componentRelease );
+            for (Object release1 : releases) {
+                final Release release = (Release) release1;
+                final Release componentRelease = getRelease(componentReleases, release.getVersion());
+                if (componentRelease != null) {
+                    release.addComponent(componentName, componentRelease);
                 }
-                mergedReleases.add( release );
+                mergedReleases.add(release);
             }
         }
 
-        for ( Iterator iterator = componentReleases.iterator(); iterator.hasNext(); )
-        {
-            final Release release = (Release) iterator.next();
-            final Release mergedRelease = getRelease( mergedReleases, release.getVersion() );
-            if ( mergedRelease == null )
-            {
+        for (Object componentRelease1 : componentReleases) {
+            final Release release = (Release) componentRelease1;
+            final Release mergedRelease = getRelease(mergedReleases, release.getVersion());
+            if (mergedRelease == null) {
                 final Release componentRelease = new Release();
-                componentRelease.setVersion( release.getVersion() );
-                componentRelease.setDateRelease( release.getDateRelease() );
-                componentRelease.addComponent( componentName, release );
-                mergedReleases.add( componentRelease );
+                componentRelease.setVersion(release.getVersion());
+                componentRelease.setDateRelease(release.getDateRelease());
+                componentRelease.addComponent(componentName, release);
+                mergedReleases.add(componentRelease);
             }
         }
 

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/github/GitHubMojo.java Sun Aug 25 18:02:43 2013
@@ -55,15 +55,15 @@ public class GitHubMojo
 
     static
     {
-        GITHUB_COLUMNS.put( "Assignee", Integer.valueOf( IssuesReportHelper.COLUMN_ASSIGNEE ) );
-        GITHUB_COLUMNS.put( "Created", Integer.valueOf( IssuesReportHelper.COLUMN_CREATED ) );
-        GITHUB_COLUMNS.put( "Fix Version", Integer.valueOf( IssuesReportHelper.COLUMN_FIX_VERSION ) );
-        GITHUB_COLUMNS.put( "Id", Integer.valueOf( IssuesReportHelper.COLUMN_ID ) );
-        GITHUB_COLUMNS.put( "Reporter", Integer.valueOf( IssuesReportHelper.COLUMN_REPORTER ) );
-        GITHUB_COLUMNS.put( "Status", Integer.valueOf( IssuesReportHelper.COLUMN_STATUS ) );
-        GITHUB_COLUMNS.put( "Summary", Integer.valueOf( IssuesReportHelper.COLUMN_SUMMARY ) );
-        GITHUB_COLUMNS.put( "Type", Integer.valueOf( IssuesReportHelper.COLUMN_TYPE ) );
-        GITHUB_COLUMNS.put( "Updated", Integer.valueOf( IssuesReportHelper.COLUMN_UPDATED ) );
+        GITHUB_COLUMNS.put( "Assignee", IssuesReportHelper.COLUMN_ASSIGNEE);
+        GITHUB_COLUMNS.put( "Created", IssuesReportHelper.COLUMN_CREATED);
+        GITHUB_COLUMNS.put( "Fix Version", IssuesReportHelper.COLUMN_FIX_VERSION);
+        GITHUB_COLUMNS.put( "Id", IssuesReportHelper.COLUMN_ID);
+        GITHUB_COLUMNS.put( "Reporter", IssuesReportHelper.COLUMN_REPORTER);
+        GITHUB_COLUMNS.put( "Status", IssuesReportHelper.COLUMN_STATUS);
+        GITHUB_COLUMNS.put( "Summary", IssuesReportHelper.COLUMN_SUMMARY);
+        GITHUB_COLUMNS.put( "Type", IssuesReportHelper.COLUMN_TYPE);
+        GITHUB_COLUMNS.put( "Updated", IssuesReportHelper.COLUMN_UPDATED);
     }
 
     /**

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/AbstractIssuesReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/AbstractIssuesReportGenerator.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/AbstractIssuesReportGenerator.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/AbstractIssuesReportGenerator.java Sun Aug 25 18:02:43 2013
@@ -68,7 +68,7 @@ public abstract class AbstractIssuesRepo
     {
         sink.head();
 
-        String title = null;
+        String title;
         if ( this.title != null )
         {
             title = this.title;

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueUtils.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueUtils.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueUtils.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssueUtils.java Sun Aug 25 18:02:43 2013
@@ -49,20 +49,16 @@ public class IssueUtils
     {
         List<Issue> filteredIssues = new ArrayList<Issue>();
         boolean isFound = false;
-        Issue issue = null;
+        Issue issue;
 
-        for ( int i = 0; i < issues.size(); i++ )
-        {
-            issue = (Issue) issues.get( i );
+        for (Issue issue1 : issues) {
+            issue = (Issue) issue1;
 
-            if ( issue.getFixVersions() != null )
-            {
-                for ( String fixVersion : issue.getFixVersions() )
-                {
-                    if ( prefix == null || fixVersion.startsWith( prefix ) )
-                    {
+            if (issue.getFixVersions() != null) {
+                for (String fixVersion : issue.getFixVersions()) {
+                    if (prefix == null || fixVersion.startsWith(prefix)) {
                         isFound = true;
-                        filteredIssues.add( issue );
+                        filteredIssues.add(issue);
                         break;
                     }
                 }
@@ -94,7 +90,7 @@ public class IssueUtils
     {
         List<Issue> issuesForVersion = new ArrayList<Issue>();
         boolean isFound = false;
-        Issue issue = null;
+        Issue issue;
         String releaseVersion = version;
 
         // Remove "-SNAPSHOT" from the end of the version, if it's there
@@ -103,14 +99,12 @@ public class IssueUtils
             releaseVersion = version.substring( 0, version.length() - SNAPSHOT_SUFFIX.length() );
         }
 
-        for ( int i = 0; i < issues.size(); i++ )
-        {
-            issue = (Issue) issues.get( i );
+        for (Issue issue1 : issues) {
+            issue = (Issue) issue1;
 
-            if ( issue.getFixVersions() != null && issue.getFixVersions().contains( releaseVersion ) )
-            {
+            if (issue.getFixVersions() != null && issue.getFixVersions().contains(releaseVersion)) {
                 isFound = true;
-                issuesForVersion.add( issue );
+                issuesForVersion.add(issue);
             }
         }
 

Modified: maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java?rev=1517354&r1=1517353&r2=1517354&view=diff
==============================================================================
--- maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java (original)
+++ maven/plugins/trunk/maven-changes-plugin/src/main/java/org/apache/maven/plugin/issues/IssuesReportGenerator.java Sun Aug 25 18:02:43 2013
@@ -93,64 +93,62 @@ public class IssuesReportGenerator exten
 
         sink.tableRow();
 
-        for ( int columnIndex = 0; columnIndex < columns.length; columnIndex++ )
-        {
-            switch ( columns[columnIndex] )
-            {
+        for (int column : columns) {
+            switch (column) {
                 case IssuesReportHelper.COLUMN_ASSIGNEE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.assignee" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.assignee"));
                     break;
 
                 case IssuesReportHelper.COLUMN_COMPONENT:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.component" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.component"));
                     break;
 
                 case IssuesReportHelper.COLUMN_CREATED:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.created" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.created"));
                     break;
 
                 case IssuesReportHelper.COLUMN_FIX_VERSION:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.fixVersion" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.fixVersion"));
                     break;
 
                 case IssuesReportHelper.COLUMN_ID:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.id" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.id"));
                     break;
 
                 case IssuesReportHelper.COLUMN_KEY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.key" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.key"));
                     break;
 
                 case IssuesReportHelper.COLUMN_PRIORITY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.priority" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.priority"));
                     break;
 
                 case IssuesReportHelper.COLUMN_REPORTER:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.reporter" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.reporter"));
                     break;
 
                 case IssuesReportHelper.COLUMN_RESOLUTION:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.resolution" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.resolution"));
                     break;
 
                 case IssuesReportHelper.COLUMN_STATUS:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.status" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.status"));
                     break;
 
                 case IssuesReportHelper.COLUMN_SUMMARY:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.summary" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.summary"));
                     break;
 
                 case IssuesReportHelper.COLUMN_TYPE:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.type" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.type"));
                     break;
 
                 case IssuesReportHelper.COLUMN_UPDATED:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.updated" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.updated"));
                     break;
 
                 case IssuesReportHelper.COLUMN_VERSION:
-                    sinkHeader( sink, bundle.getString( "report.issues.label.version" ) );
+                    sinkHeader(sink, bundle.getString("report.issues.label.version"));
                     break;
 
                 default:
@@ -169,91 +167,86 @@ public class IssuesReportGenerator exten
             return;
         }
 
-        for ( int idx = 0; idx < issueList.size(); idx++ )
-        {
+        for (Object anIssueList : issueList) {
             // Use a DateFormat based on the Locale
-            DateFormat df = DateFormat.getDateInstance( DateFormat.SHORT, locale );
+            DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT, locale);
 
-            Issue issue = (Issue) issueList.get( idx );
+            Issue issue = (Issue) anIssueList;
 
             sink.tableRow();
 
-            for ( int columnIndex = 0; columnIndex < columns.length; columnIndex++ )
-            {
-                switch ( columns[columnIndex] )
-                {
+            for (int column : columns) {
+                switch (column) {
                     case IssuesReportHelper.COLUMN_ASSIGNEE:
-                        sinkCell( sink, issue.getAssignee() );
+                        sinkCell(sink, issue.getAssignee());
                         break;
 
                     case IssuesReportHelper.COLUMN_COMPONENT:
-                        sinkCell( sink, IssuesReportHelper.printValues( issue.getComponents() ) );
+                        sinkCell(sink, IssuesReportHelper.printValues(issue.getComponents()));
                         break;
 
                     case IssuesReportHelper.COLUMN_CREATED:
                         String created = NOT_AVAILABLE;
-                        if ( issue.getCreated() != null )
-                        {
-                            created = df.format( issue.getCreated() );
+                        if (issue.getCreated() != null) {
+                            created = df.format(issue.getCreated());
                         }
-                        sinkCell( sink, created );
+                        sinkCell(sink, created);
                         break;
 
                     case IssuesReportHelper.COLUMN_FIX_VERSION:
-                        sinkCell( sink, IssuesReportHelper.printValues( issue.getFixVersions() ) );
+                        sinkCell(sink, IssuesReportHelper.printValues(issue.getFixVersions()));
                         break;
 
                     case IssuesReportHelper.COLUMN_ID:
                         sink.tableCell();
-                        sink.link( issue.getLink() );
-                        sink.text( issue.getId() );
+                        sink.link(issue.getLink());
+                        sink.text(issue.getId());
                         sink.link_();
                         sink.tableCell_();
                         break;
 
                     case IssuesReportHelper.COLUMN_KEY:
                         sink.tableCell();
-                        sink.link( issue.getLink() );
-                        sink.text( issue.getKey() );
+                        sink.link(issue.getLink());
+                        sink.text(issue.getKey());
                         sink.link_();
                         sink.tableCell_();
                         break;
 
                     case IssuesReportHelper.COLUMN_PRIORITY:
-                        sinkCell( sink, issue.getPriority() );
+                        sinkCell(sink, issue.getPriority());
                         break;
 
                     case IssuesReportHelper.COLUMN_REPORTER:
-                        sinkCell( sink, issue.getReporter() );
+                        sinkCell(sink, issue.getReporter());
                         break;
 
                     case IssuesReportHelper.COLUMN_RESOLUTION:
-                        sinkCell( sink, issue.getResolution() );
+                        sinkCell(sink, issue.getResolution());
                         break;
 
                     case IssuesReportHelper.COLUMN_STATUS:
-                        sinkCell( sink, issue.getStatus() );
+                        sinkCell(sink, issue.getStatus());
                         break;
 
                     case IssuesReportHelper.COLUMN_SUMMARY:
-                        sinkCell( sink, issue.getSummary() );
+                        sinkCell(sink, issue.getSummary());
                         break;
 
                     case IssuesReportHelper.COLUMN_TYPE:
-                        sinkCell( sink, issue.getType() );
+                        sinkCell(sink, issue.getType());
                         break;
 
                     case IssuesReportHelper.COLUMN_UPDATED:
                         String updated = NOT_AVAILABLE;
-                        if ( issue.getUpdated() != null )
-                        {
-                            updated = df.format( issue.getUpdated() );
+                        if (issue.getUpdated() != null) {
+                            updated = df.format(issue.getUpdated());
                         }
-                        sinkCell( sink, updated );
+                        sinkCell(sink, updated);
                         break;
 
                     case IssuesReportHelper.COLUMN_VERSION:
-                        sinkCell( sink, issue.getVersion() );
+                        sinkCell(sink, issue.getVersion());
                         break;
 
                     default:



Mime
View raw message