continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r765340 [2/3] - in /continuum/branches/continuum-1.3.x: continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/ continuum-base/continuum-scm/src/main/java/org/apache/continuum/scm/manager/ continuum-base/continuum-scm/src/main/...
Date Wed, 15 Apr 2009 20:22:05 GMT
Modified: continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuite.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuite.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuite.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuite.java Wed Apr 15 20:22:00 2009
@@ -1,3 +1,4 @@
+package org.apache.maven.continuum.reports.surefire;
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
@@ -16,15 +17,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.maven.continuum.reports.surefire;
 
-import org.xml.sax.Attributes;
-import org.xml.sax.SAXException;
-import org.xml.sax.helpers.DefaultHandler;
-
-import javax.xml.parsers.ParserConfigurationException;
-import javax.xml.parsers.SAXParser;
-import javax.xml.parsers.SAXParserFactory;
 import java.io.File;
 import java.io.IOException;
 import java.text.NumberFormat;
@@ -33,6 +26,14 @@
 import java.util.LinkedList;
 import java.util.List;
 
+import javax.xml.parsers.ParserConfigurationException;
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
  * @version $Id$
@@ -57,7 +58,7 @@
 
     private float timeElapsed;
 
-    private NumberFormat numberFormat = NumberFormat.getInstance();
+    private final NumberFormat numberFormat = NumberFormat.getInstance();
 
     /**
      * @noinspection StringBufferField
@@ -139,7 +140,7 @@
 
                 String timeAsString = attributes.getValue( "time" );
 
-                Number time = new Integer( 0 );
+                Number time = 0;
 
                 if ( timeAsString != null )
                 {

Modified: continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuiteGenerator.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuiteGenerator.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuiteGenerator.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-reports/src/main/java/org/apache/maven/continuum/reports/surefire/ReportTestSuiteGenerator.java Wed Apr 15 20:22:00 2009
@@ -23,45 +23,50 @@
 
 /**
  * @author <a href="mailto:olamy@apache.org">olamy</a>
- * @since 12 nov. 07
  * @version $Id$
+ * @since 12 nov. 07
  */
 public interface ReportTestSuiteGenerator
 {
 
     /**
      * @param directory directory containing surefire tests files
-     * @param includes file types to include
-     * @param excludes file types to exclude
+     * @param includes  file types to include
+     * @param excludes  file types to exclude
      * @return List of {@link ReportTestSuite}
      * @throws ReportTestSuiteGeneratorException
+     *
      */
     List<ReportTestSuite> generateReports( File directory, List<String> includes, List<String> excludes )
         throws ReportTestSuiteGeneratorException;
-    
+
     /**
      * Use generateReports with default includes *.xml and default excludes *.txt
+     *
      * @param directory directory containing surefire tests files
      * @return List of {@link ReportTestSuite}
      * @throws ReportTestSuiteGeneratorException
+     *
      */
     List<ReportTestSuite> generateReports( File directory )
-        throws ReportTestSuiteGeneratorException;  
-    
+        throws ReportTestSuiteGeneratorException;
+
     /**
      * @param buildId
      * @param projectId
      * @return List of {@link ReportTestSuite}
      * @throws ReportTestSuiteGeneratorException
+     *
      */
     List<ReportTestSuite> generateReports( int buildId, int projectId )
         throws ReportTestSuiteGeneratorException;
-    
+
     /**
      * @param buildId
      * @param projectId
-     * @return List of {@link TestResult}
+     * @return List of {@link ReportTestResult}
      * @throws ReportTestSuiteGeneratorException
+     *
      */
     ReportTestResult generateReportTestResult( int buildId, int projectId )
         throws ReportTestSuiteGeneratorException;

Modified: continuum/branches/continuum-1.3.x/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-security/src/main/java/org/apache/maven/continuum/security/ContinuumRoleConstants.java Wed Apr 15 20:22:00 2009
@@ -21,8 +21,8 @@
 /**
  * ContinuumRoleConstants:
  *
- * @author: Jesse McConnell <jmcconnell@apache.org>
- * @version: $Id$
+ * @author Jesse McConnell <jmcconnell@apache.org>
+ * @version $Id$
  */
 public class ContinuumRoleConstants
 {
@@ -109,21 +109,21 @@
     public static final String USER_MANAGEMENT_USER_ROLE_OPERATION = "user-management-user-role";
 
     public static final String CONTINUUM_MANAGE_INSTALLATIONS = "continuum-manage-installations";
-    
+
     public static final String CONTINUUM_MANAGE_PROFILES = "continuum-manage-profiles";
-    
+
     public static final String CONTINUUM_MANAGE_BUILD_TEMPLATES = "continuum-manage-build-templates";
-    
+
     public static final String CONTINUUM_MANAGE_QUEUES = "continuum-manage-queues";
-    
+
     public static final String CONTINUUM_VIEW_QUEUES = "continuum-view-queues";
-    
+
     public static final String CONTINUUM_MANAGE_REPOSITORIES = "continuum-manage-repositories";
-    
+
     public static final String CONTINUUM_MANAGE_PURGING = "continuum-manage-purging";
 
     public static final String CONTINUUM_MANAGE_DISTRIBUTED_BUILDS = "continuum-manage-distributed-builds";
-    
+
     public static final String CONTINUUM_VIEW_RELEASE = "continuum-view-release";
 
     public static final String CONTINUUM_MANAGE_PARALLEL_BUILDS = "continuum-manage-parallel-builds";

Modified: continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/BuildDefinitionDaoImpl.java Wed Apr 15 20:22:00 2009
@@ -19,6 +19,18 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.annotation.Resource;
+import javax.jdo.Extent;
+import javax.jdo.PersistenceManager;
+import javax.jdo.Query;
+import javax.jdo.Transaction;
+
 import org.apache.maven.continuum.execution.ContinuumBuildExecutorConstants;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.Project;
@@ -30,17 +42,6 @@
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Repository;
 
-import javax.annotation.Resource;
-import javax.jdo.Extent;
-import javax.jdo.PersistenceManager;
-import javax.jdo.Query;
-import javax.jdo.Transaction;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
  * @version $Id$
@@ -51,7 +52,7 @@
     extends AbstractDao
     implements BuildDefinitionDao
 {
-    private Logger log = LoggerFactory.getLogger( BuildDefinitionDaoImpl.class );
+    private static final Logger log = LoggerFactory.getLogger( BuildDefinitionDaoImpl.class );
 
     /**
      * @plexus.requirement role="org.apache.continuum.dao.ProjectDao"

Modified: continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DirectoryPurgeConfigurationDaoImpl.java Wed Apr 15 20:22:00 2009
@@ -63,7 +63,7 @@
 
             query.setFilter( "this.schedule.id == scheduleId" );
 
-            List result = (List) query.execute( new Integer( scheduleId ) );
+            List result = (List) query.execute( scheduleId );
 
             return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
         }

Modified: continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/ProjectGroupDaoImpl.java Wed Apr 15 20:22:00 2009
@@ -223,7 +223,7 @@
 
             query.setFilter( "this.localRepository.id == repositoryId" );
 
-            List result = (List) query.execute( new Integer( repositoryId ) );
+            List result = (List) query.execute( repositoryId );
 
             return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
         }

Modified: continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/RepositoryPurgeConfigurationDaoImpl.java Wed Apr 15 20:22:00 2009
@@ -19,16 +19,17 @@
  * under the License.
  */
 
-import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
-import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.springframework.stereotype.Repository;
+import java.util.Collections;
+import java.util.List;
 
 import javax.jdo.Extent;
 import javax.jdo.PersistenceManager;
 import javax.jdo.Query;
 import javax.jdo.Transaction;
-import java.util.Collections;
-import java.util.List;
+
+import org.apache.continuum.model.repository.RepositoryPurgeConfiguration;
+import org.apache.maven.continuum.store.ContinuumStoreException;
+import org.springframework.stereotype.Repository;
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -63,7 +64,7 @@
 
             query.setFilter( "this.schedule.id == scheduleId" );
 
-            List result = (List) query.execute( new Integer( scheduleId ) );
+            List result = (List) query.execute( scheduleId );
 
             return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
         }
@@ -93,7 +94,7 @@
 
             query.setFilter( "this.repository.id == repositoryId" );
 
-            List result = (List) query.execute( new Integer( repositoryId ) );
+            List result = (List) query.execute( repositoryId );
 
             return result == null ? Collections.EMPTY_LIST : (List) pm.detachCopyAll( result );
         }

Modified: continuum/branches/continuum-1.3.x/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-test/src/main/java/org/apache/maven/continuum/configuration/ConfigurationServiceMock.java Wed Apr 15 20:22:00 2009
@@ -19,6 +19,10 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
 import org.apache.continuum.configuration.BuildAgentConfiguration;
 import org.apache.continuum.configuration.BuildAgentGroupConfiguration;
@@ -26,10 +30,6 @@
 import org.apache.maven.continuum.model.project.Schedule;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
-import java.io.File;
-import java.util.List;
-import java.util.Map;
-
 /**
  * Mock class for testing WagonContinuumNotifier's call to ConfigurationService.getBuildOutputFile()
  *
@@ -38,7 +38,7 @@
 public class ConfigurationServiceMock
     implements ConfigurationService
 {
-    private String basedir;
+    private final String basedir;
 
     public ConfigurationServiceMock()
     {
@@ -238,7 +238,7 @@
             throw new ConfigurationException(
                 "Could not make the release output directory: " + "'" + dir.getAbsolutePath() + "'." );
         }
-    
+
         return new File( dir, releaseName + ".log.txt" );
     }
 
@@ -255,15 +255,15 @@
     {
         return 1;
     }
-    
+
     public void setNumberOfBuildsInParallel( int num )
     {
-        
+
     }
 
     public void addBuildAgent( BuildAgentConfiguration buildAgent )
         throws ConfigurationException
-    {    
+    {
     }
 
     public List<BuildAgentConfiguration> getBuildAgents()
@@ -277,7 +277,7 @@
     }
 
     public void removeBuildAgent( BuildAgentConfiguration buildAgent )
-    {   
+    {
     }
 
     public void setDistributedBuildEnabled( boolean distributedBuildEnabled )
@@ -323,7 +323,7 @@
         return null;
     }
 
-    public BuildAgentConfiguration getBuildAgent(String url)
+    public BuildAgentConfiguration getBuildAgent( String url )
     {
         return null;
     }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/ReleaseResultAction.java Wed Apr 15 20:22:00 2009
@@ -42,7 +42,7 @@
 public class ReleaseResultAction
     extends ContinuumConfirmAction
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( ReleaseResultAction.class );
 
     private int projectGroupId;
 

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/BuildAgentAction.java Wed Apr 15 20:22:00 2009
@@ -50,7 +50,7 @@
     extends ContinuumConfirmAction
     implements SecureAction
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( BuildAgentAction.class );
 
     /**
      * @plexus.requirement

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/action/admin/PurgeConfigurationAction.java Wed Apr 15 20:22:00 2009
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import com.opensymphony.xwork2.Preparable;
+
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
@@ -43,86 +45,83 @@
 import org.codehaus.redback.integration.interceptor.SecureActionBundle;
 import org.codehaus.redback.integration.interceptor.SecureActionException;
 
-import com.opensymphony.xwork2.Preparable;
-
 /**
  * @author Maria Catherine Tan
  * @version $Id$
- * @since 25 jul 07
  * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="purgeConfiguration"
- *
+ * @since 25 jul 07
  */
 public class PurgeConfigurationAction
     extends ContinuumConfirmAction
     implements Preparable, SecureAction
 {
     private static final String PURGE_TYPE_REPOSITORY = "repository";
-    
+
     private static final String PURGE_TYPE_DIRECTORY = "directory";
-    
+
     private static final String PURGE_DIRECTORY_RELEASES = "releases";
-    
+
     private static final String PURGE_DIRECTORY_BUILDOUTPUT = "buildOutput";
-    
+
     private static final int DEFAULT_RETENTION_COUNT = 2;
-    
+
     private static final int DEFAULT_DAYS_OLDER = 100;
-    
+
     private String purgeType;
-    
+
     private String directoryType;
-    
+
     private String description;
-    
+
     private String message;
-    
+
     private boolean deleteAll;
-    
+
     private boolean deleteReleasedSnapshots;
-    
+
     private boolean enabled;
-    
+
     private boolean confirmed;
-    
+
     private boolean defaultPurgeConfiguration;
-    
+
     private int retentionCount;
-    
+
     private int daysOlder;
-    
+
     private int repositoryId;
-    
+
     private int scheduleId;
-    
+
     private int purgeConfigId;
-    
+
     private AbstractPurgeConfiguration purgeConfig;
-    
+
     private Map<Integer, String> repositories;
-    
+
     private Map<Integer, String> schedules;
-    
+
     private List<RepositoryPurgeConfiguration> repoPurgeConfigs;
-    
+
     private List<DirectoryPurgeConfiguration> dirPurgeConfigs;
-    
+
     private List<String> directoryTypes;
-    
+
     /**
      * @plexus.requirement
      */
     private PurgeConfigurationService purgeConfigService;
-    
+
     /**
      * @plexus.requirement
      */
     private RepositoryService repositoryService;
-    
+
     public void prepare()
         throws Exception
     {
         super.prepare();
-        
+
         // build schedules
         if ( schedules == null )
         {
@@ -132,35 +131,35 @@
 
             for ( Schedule schedule : allSchedules )
             {
-                schedules.put( new Integer( schedule.getId() ), schedule.getName() );
+                schedules.put( schedule.getId(), schedule.getName() );
             }
         }
-        
+
         // build repositories
         if ( repositories == null )
         {
             repositories = new HashMap<Integer, String>();
-            
+
             List<LocalRepository> allRepositories = repositoryService.getAllLocalRepositories();
-            
+
             for ( LocalRepository repository : allRepositories )
             {
-                repositories.put( new Integer( repository.getId() ), repository.getName() );
+                repositories.put( repository.getId(), repository.getName() );
             }
         }
-        
+
         directoryTypes = new ArrayList<String>();
         directoryTypes.add( PURGE_DIRECTORY_RELEASES );
         directoryTypes.add( PURGE_DIRECTORY_BUILDOUTPUT );
     }
-    
+
     public String input()
         throws Exception
     {
         if ( purgeConfigId != 0 )
         {
             purgeConfig = purgeConfigService.getPurgeConfiguration( purgeConfigId );
-            
+
             if ( purgeConfig instanceof RepositoryPurgeConfiguration )
             {
                 RepositoryPurgeConfiguration repoPurge = (RepositoryPurgeConfiguration) purgeConfig;
@@ -173,12 +172,12 @@
                 this.enabled = repoPurge.isEnabled();
                 this.defaultPurgeConfiguration = repoPurge.isDefaultPurge();
                 this.description = repoPurge.getDescription();
-                
+
                 if ( repoPurge.getRepository() != null )
                 {
                     this.repositoryId = repoPurge.getRepository().getId();
                 }
-                
+
                 if ( repoPurge.getSchedule() != null )
                 {
                     this.scheduleId = repoPurge.getSchedule().getId();
@@ -187,7 +186,7 @@
             else if ( purgeConfig instanceof DirectoryPurgeConfiguration )
             {
                 DirectoryPurgeConfiguration dirPurge = (DirectoryPurgeConfiguration) purgeConfig;
-                
+
                 this.purgeType = PURGE_TYPE_DIRECTORY;
                 this.daysOlder = dirPurge.getDaysOlder();
                 this.retentionCount = dirPurge.getRetentionCount();
@@ -196,7 +195,7 @@
                 this.enabled = dirPurge.isEnabled();
                 this.defaultPurgeConfiguration = dirPurge.isDefaultPurge();
                 this.description = dirPurge.getDescription();
-                
+
                 if ( dirPurge.getSchedule() != null )
                 {
                     this.scheduleId = dirPurge.getSchedule().getId();
@@ -208,26 +207,26 @@
             this.retentionCount = DEFAULT_RETENTION_COUNT;
             this.daysOlder = DEFAULT_DAYS_OLDER;
         }
-        
+
         return INPUT;
     }
-    
+
     public String list()
         throws Exception
     {
         String errorMessage = ServletActionContext.getRequest().getParameter( "errorMessage" );
-        
+
         if ( errorMessage != null )
         {
             addActionError( getText( errorMessage ) );
         }
-        
+
         repoPurgeConfigs = purgeConfigService.getAllRepositoryPurgeConfigurations();
         dirPurgeConfigs = purgeConfigService.getAllDirectoryPurgeConfigurations();
-        
+
         return SUCCESS;
     }
-    
+
     public String save()
         throws Exception
     {
@@ -241,63 +240,63 @@
             {
                 purgeConfig = new DirectoryPurgeConfiguration();
             }
-            
+
             purgeConfig = setupPurgeConfiguration( purgeConfig );
-            
+
             purgeConfig = purgeConfigService.addPurgeConfiguration( purgeConfig );
         }
         else
         {
             purgeConfig = purgeConfigService.getPurgeConfiguration( purgeConfigId );
             purgeConfig = setupPurgeConfiguration( purgeConfig );
-            
+
             purgeConfigService.updatePurgeConfiguration( purgeConfig );
         }
-        
+
         if ( purgeConfig.isDefaultPurge() )
         {
             updateDefaultPurgeConfiguration();
         }
-        
+
         return SUCCESS;
     }
-    
+
     public String remove()
         throws Exception
     {
         if ( confirmed )
         {
-        	purgeConfigService.removePurgeConfiguration( purgeConfigId );
+            purgeConfigService.removePurgeConfiguration( purgeConfigId );
         }
         else
         {
             return CONFIRM;
         }
-        
+
         return SUCCESS;
     }
-    
+
     public String purge()
         throws Exception
     {
         ContinuumPurgeManager purgeManager = getContinuum().getPurgeManager();
         TaskQueueManager taskQueueManager = getContinuum().getTaskQueueManager();
-        
+
         if ( purgeConfigId > 0 )
         {
             purgeConfig = purgeConfigService.getPurgeConfiguration( purgeConfigId );
-            
+
             if ( purgeConfig instanceof RepositoryPurgeConfiguration )
             {
                 RepositoryPurgeConfiguration repoPurge = (RepositoryPurgeConfiguration) purgeConfig;
-                
+
                 // check if repository is in use
                 if ( taskQueueManager.isRepositoryInUse( repoPurge.getRepository().getId() ) )
                 {
                     message = "repository.error.purge.in.use";
                     return ERROR;
                 }
-                
+
                 purgeManager.purgeRepository( repoPurge );
             }
             else
@@ -306,210 +305,210 @@
                 purgeManager.purgeDirectory( dirPurge );
             }
         }
-        
+
         return SUCCESS;
     }
-    
+
     public String getPurgeType()
     {
         return this.purgeType;
     }
-    
+
     public void setPurgeType( String purgeType )
     {
         this.purgeType = purgeType;
     }
-    
+
     public String getDirectoryType()
     {
         return this.directoryType;
     }
-    
+
     public void setDirectoryType( String directoryType )
     {
         this.directoryType = directoryType;
     }
-    
+
     public String getDescription()
     {
         return this.description;
     }
-    
+
     public void setDescription( String description )
     {
         this.description = description;
     }
-    
+
     public String getMessage()
     {
         return this.message;
     }
-    
+
     public void setMessage( String message )
     {
         this.message = message;
     }
-    
+
     public boolean isDeleteAll()
     {
         return this.deleteAll;
     }
-    
+
     public void setDeleteAll( boolean deleteAll )
     {
         this.deleteAll = deleteAll;
     }
-    
+
     public boolean isDeleteReleasedSnapshots()
     {
         return this.deleteReleasedSnapshots;
     }
-    
+
     public void setDeleteReleasedSnapshots( boolean deleteReleasedSnapshots )
     {
         this.deleteReleasedSnapshots = deleteReleasedSnapshots;
     }
-    
+
     public boolean isEnabled()
     {
         return this.enabled;
     }
-    
+
     public void setEnabled( boolean enabled )
     {
         this.enabled = enabled;
     }
-    
+
     public boolean isConfirmed()
     {
         return this.confirmed;
     }
-    
+
     public void setConfirmed( boolean confirmed )
     {
         this.confirmed = confirmed;
     }
-    
+
     public boolean isDefaultPurgeConfiguration()
     {
         return this.defaultPurgeConfiguration;
     }
-    
+
     public void setDefaultPurgeConfiguration( boolean defaultPurgeConfiguration )
     {
         this.defaultPurgeConfiguration = defaultPurgeConfiguration;
     }
-    
+
     public int getRetentionCount()
     {
         return this.retentionCount;
     }
-    
+
     public void setRetentionCount( int retentionCount )
     {
         this.retentionCount = retentionCount;
     }
-    
+
     public int getDaysOlder()
     {
         return this.daysOlder;
     }
-    
+
     public void setDaysOlder( int daysOlder )
     {
         this.daysOlder = daysOlder;
     }
-    
+
     public int getRepositoryId()
     {
         return this.repositoryId;
     }
-    
+
     public void setRepositoryId( int repositoryId )
     {
         this.repositoryId = repositoryId;
     }
-    
+
     public int getScheduleId()
     {
         return this.scheduleId;
     }
-    
+
     public void setScheduleId( int scheduleId )
     {
         this.scheduleId = scheduleId;
     }
-    
+
     public int getPurgeConfigId()
     {
         return purgeConfigId;
     }
-    
+
     public void setPurgeConfigId( int purgeConfigId )
     {
         this.purgeConfigId = purgeConfigId;
     }
-    
+
     public AbstractPurgeConfiguration getPurgeConfig()
     {
         return this.purgeConfig;
     }
-    
+
     public void setPurgeConfig( AbstractPurgeConfiguration purgeConfig )
     {
         this.purgeConfig = purgeConfig;
     }
-    
+
     public Map<Integer, String> getRepositories()
     {
         return this.repositories;
     }
-    
+
     public void setRepositories( Map<Integer, String> repositories )
     {
         this.repositories = repositories;
     }
-    
+
     public Map<Integer, String> getSchedules()
     {
         return this.schedules;
     }
-    
+
     public void setSchedules( Map<Integer, String> schedules )
     {
         this.schedules = schedules;
     }
-    
+
     public List<RepositoryPurgeConfiguration> getRepoPurgeConfigs()
     {
         return this.repoPurgeConfigs;
     }
-    
+
     public void setRepoPurgeConfigs( List<RepositoryPurgeConfiguration> repoPurgeConfigs )
     {
         this.repoPurgeConfigs = repoPurgeConfigs;
     }
-    
+
     public List<DirectoryPurgeConfiguration> getDirPurgeConfigs()
     {
         return this.dirPurgeConfigs;
     }
-    
+
     public void setDirPurgeConfigs( List<DirectoryPurgeConfiguration> dirPurgeConfigs )
     {
         this.dirPurgeConfigs = dirPurgeConfigs;
     }
-    
+
     public List<String> getDirectoryTypes()
     {
         return this.directoryTypes;
     }
-    
+
     public void setDirectoryTypes( List<String> directoryTypes )
     {
         this.directoryTypes = directoryTypes;
     }
-    
+
     private AbstractPurgeConfiguration setupPurgeConfiguration( AbstractPurgeConfiguration purgeConfiguration )
         throws Exception
     {
@@ -522,7 +521,7 @@
             return buildDirPurgeConfiguration();
         }
     }
-    
+
     private RepositoryPurgeConfiguration buildRepoPurgeConfiguration()
         throws Exception
     {
@@ -535,22 +534,22 @@
         repoPurge.setDefaultPurge( this.defaultPurgeConfiguration );
         repoPurge.setDescription( this.description );
         repoPurge.setDefaultPurge( this.defaultPurgeConfiguration );
-        
+
         if ( repositoryId != 0 )
         {
             LocalRepository repository = repositoryService.getLocalRepository( repositoryId );
             repoPurge.setRepository( repository );
         }
-        
+
         if ( scheduleId > 0 )
         {
             Schedule schedule = getContinuum().getSchedule( scheduleId );
             repoPurge.setSchedule( schedule );
         }
-        
+
         return repoPurge;
     }
-    
+
     private DirectoryPurgeConfiguration buildDirPurgeConfiguration()
         throws Exception
     {
@@ -562,16 +561,16 @@
         dirPurge.setDescription( this.description );
         dirPurge.setDirectoryType( this.directoryType );
         dirPurge.setDefaultPurge( this.defaultPurgeConfiguration );
-        
+
         if ( scheduleId > 0 )
         {
             Schedule schedule = getContinuum().getSchedule( scheduleId );
             dirPurge.setSchedule( schedule );
         }
-        
+
         ConfigurationService configService = getContinuum().getConfiguration();
         String path = null;
-        
+
         if ( this.directoryType.equals( PURGE_DIRECTORY_RELEASES ) )
         {
             path = configService.getWorkingDirectory().getAbsolutePath();
@@ -580,19 +579,20 @@
         {
             path = configService.getBuildOutputDirectory().getAbsolutePath();
         }
-        
+
         dirPurge.setLocation( path );
-        
+
         return dirPurge;
     }
-    
+
     private void updateDefaultPurgeConfiguration()
         throws Exception
     {
         if ( purgeConfig instanceof RepositoryPurgeConfiguration )
         {
-            RepositoryPurgeConfiguration repoPurge = purgeConfigService.getDefaultPurgeConfigurationForRepository( repositoryId );
-            
+            RepositoryPurgeConfiguration repoPurge =
+                purgeConfigService.getDefaultPurgeConfigurationForRepository( repositoryId );
+
             if ( repoPurge != null && repoPurge.getId() != purgeConfig.getId() )
             {
                 repoPurge.setDefaultPurge( false );
@@ -601,8 +601,9 @@
         }
         else if ( purgeConfig instanceof DirectoryPurgeConfiguration )
         {
-            DirectoryPurgeConfiguration dirPurge = purgeConfigService.getDefaultPurgeConfigurationForDirectoryType( directoryType );
-            
+            DirectoryPurgeConfiguration dirPurge =
+                purgeConfigService.getDefaultPurgeConfigurationForDirectoryType( directoryType );
+
             if ( dirPurge != null && dirPurge.getId() != purgeConfig.getId() )
             {
                 dirPurge.setDefaultPurge( false );
@@ -610,7 +611,7 @@
             }
         }
     }
-    
+
     public SecureActionBundle getSecureActionBundle()
         throws SecureActionException
     {

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/util/GenerateRecipentNotifier.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/util/GenerateRecipentNotifier.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/util/GenerateRecipentNotifier.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/continuum/web/util/GenerateRecipentNotifier.java Wed Apr 15 20:22:00 2009
@@ -36,13 +36,13 @@
 
     }
 
-    @SuppressWarnings( "unchecked" )
+    @SuppressWarnings("unchecked")
     public static String generate( ProjectNotifier notifier )
     {
         Map configuration = notifier.getConfiguration();
         String recipent = "unknown";
-        if ( ( "mail".equals( notifier.getType() ) ) || ( "msn".equals( notifier.getType() ) )
-            || ( "jabber".equals( notifier.getType() ) ) )
+        if ( ( "mail".equals( notifier.getType() ) ) || ( "msn".equals( notifier.getType() ) ) ||
+            ( "jabber".equals( notifier.getType() ) ) )
         {
             if ( StringUtils.isNotEmpty( (String) configuration.get( AbstractContinuumNotifier.ADDRESS_FIELD ) ) )
             {
@@ -68,9 +68,9 @@
             recipent = (String) configuration.get( "host" );
             if ( configuration.get( "port" ) != null )
             {
-                recipent = recipent + ":" + (String) configuration.get( "port" );
+                recipent = recipent + ":" + configuration.get( "port" );
             }
-            recipent = recipent + ":" + (String) configuration.get( "channel" );
+            recipent = recipent + ":" + configuration.get( "channel" );
         }
         if ( "wagon".equals( notifier.getType() ) )
         {

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenProjectAction.java Wed Apr 15 20:22:00 2009
@@ -27,7 +27,6 @@
 import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Iterator;
 import java.util.List;
 
 import javax.servlet.http.HttpServletRequest;
@@ -66,7 +65,7 @@
 
     private String scmPassword;
 
-    private Collection projectGroups;
+    private Collection<ProjectGroup> projectGroups;
 
     private String projectGroupName;
 
@@ -81,11 +80,11 @@
     private List<BuildDefinitionTemplate> buildDefinitionTemplates;
 
     private int buildDefinitionTemplateId;
-    
+
     private List<String> errorMessages = new ArrayList<String>();
 
     private HttpServletRequest httpServletRequest;
-    
+
     public String execute()
         throws ContinuumException, BuildDefinitionServiceException
     {
@@ -120,7 +119,7 @@
                     String encoding = this.httpServletRequest.getCharacterEncoding();
                     if ( StringUtils.isEmpty( encoding ) )
                     {
-                         encoding = System.getProperty( "file.encoding" );
+                        encoding = System.getProperty( "file.encoding" );
                     }
 
                     String encodedUsername = URLEncoder.encode( scmUsername, encoding );
@@ -128,8 +127,8 @@
 
                     StringBuffer urlBuffer = new StringBuffer();
                     urlBuffer.append( url.getProtocol() ).append( "://" );
-                    urlBuffer.append( encodedUsername ).append( ':' ).append( encodedPassword ).append( '@' )
-                        .append( url.getHost() );
+                    urlBuffer.append( encodedUsername ).append( ':' ).append( encodedPassword ).append( '@' ).append(
+                        url.getHost() );
                     if ( url.getPort() != -1 )
                     {
                         urlBuffer.append( ":" ).append( url.getPort() );
@@ -153,7 +152,7 @@
                 addActionError( getText( "add.project.unknown.error" ) );
                 return doDefault();
             }
-            
+
         }
         else
         {
@@ -194,7 +193,7 @@
             for ( String key : result.getErrors() )
             {
                 String cause = result.getErrorsWithCause().get( key );
-                String msg = getText( key, new String[] { cause } );
+                String msg = getText( key, new String[]{cause} );
 
                 // olamy : weird getText(key, String[]) must do that something like bla bla {0}
                 // here an ugly hack for CONTINUUM-1675
@@ -224,7 +223,7 @@
 
         if ( result.getProjectGroups() != null && !result.getProjectGroups().isEmpty() )
         {
-            this.setProjectGroupId( ( (ProjectGroup) result.getProjectGroups().get( 0 ) ).getId() );
+            this.setProjectGroupId( ( result.getProjectGroups().get( 0 ) ).getId() );
             return "projectGroupSummary";
         }
 
@@ -271,17 +270,16 @@
             addActionError( authzE.getMessage() );
             return REQUIRES_AUTHORIZATION;
         }
-        Collection allProjectGroups = getContinuum().getAllProjectGroups();
-        projectGroups = new ArrayList();
+        Collection<ProjectGroup> allProjectGroups = getContinuum().getAllProjectGroups();
+        projectGroups = new ArrayList<ProjectGroup>();
 
         ProjectGroup defaultGroup = new ProjectGroup();
         defaultGroup.setId( DEFINED_BY_POM_GROUP_ID );
         defaultGroup.setName( "Defined by POM" );
         projectGroups.add( defaultGroup );
 
-        for ( Iterator i = allProjectGroups.iterator(); i.hasNext(); )
+        for ( ProjectGroup pg : allProjectGroups )
         {
-            ProjectGroup pg = (ProjectGroup) i.next();
             if ( isAuthorizedToAddProjectToGroup( pg.getName() ) )
             {
                 projectGroups.add( pg );
@@ -295,7 +293,7 @@
 
     private void initializeProjectGroupName()
     {
-        if ( disableGroupSelection == true && selectedProjectGroup != DEFINED_BY_POM_GROUP_ID )
+        if ( disableGroupSelection && selectedProjectGroup != DEFINED_BY_POM_GROUP_ID )
         {
             try
             {

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddMavenTwoProjectAction.java Wed Apr 15 20:22:00 2009
@@ -60,7 +60,7 @@
         ContinuumProjectBuildingResult result = null;
 
         // TODO: remove this part once uploading of an m2 project with modules is supported ( CONTINUUM-1098 )
-        if ( checkProtocol == false )
+        if ( !checkProtocol )
         {
             MavenXpp3Reader m2pomReader = new MavenXpp3Reader();
 
@@ -106,17 +106,12 @@
         if ( result == null )
         {
             result = getContinuum().addMavenTwoProject( pomUrl, selectedProjectGroup, checkProtocol, scmUseCache,
-                                                        !this.isNonRecursiveProject(), this.getBuildDefinitionTemplateId() );
+                                                        !this.isNonRecursiveProject(),
+                                                        this.getBuildDefinitionTemplateId() );
         }
 
         return result;
     }
-    
-    public String doDefault()
-        throws BuildDefinitionServiceException
-    {
-        return super.doDefault();
-    }
 
     /**
      * @deprecated Use {@link #getPomFile()} instead
@@ -159,5 +154,4 @@
     {
         this.nonRecursiveProject = nonRecursiveProject;
     }
-
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectAction.java Wed Apr 15 20:22:00 2009
@@ -44,7 +44,7 @@
 public class AddProjectAction
     extends ContinuumActionSupport
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( AddProjectAction.class );
 
     private String projectName;
 

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/AddProjectGroupAction.java Wed Apr 15 20:22:00 2009
@@ -19,7 +19,8 @@
  * under the License.
  */
 
-import java.util.Iterator;
+import com.opensymphony.xwork2.Validateable;
+
 import java.util.List;
 
 import org.apache.continuum.model.repository.LocalRepository;
@@ -30,8 +31,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import com.opensymphony.xwork2.Validateable;
-
 /**
  * @author Henry Isidro <hisidro@exist.com>
  * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="addProjectGroup"
@@ -40,7 +39,7 @@
     extends ContinuumActionSupport
     implements Validateable
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( AddProjectGroupAction.class );
 
     private String name;
 
@@ -73,10 +72,8 @@
         }
         else if ( name != null && !name.equals( "" ) )
         {
-            Iterator iterator = getContinuum().getAllProjectGroups().iterator();
-            while ( iterator.hasNext() )
+            for ( ProjectGroup projectGroup : getContinuum().getAllProjectGroups() )
             {
-                ProjectGroup projectGroup = (ProjectGroup) iterator.next();
                 if ( name.equals( projectGroup.getName() ) )
                 {
                     addActionError( getText( "projectGroup.error.name.already.exists" ) );

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildDefinitionAction.java Wed Apr 15 20:22:00 2009
@@ -19,6 +19,12 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionService;
 import org.apache.maven.continuum.builddefinition.BuildDefinitionServiceException;
@@ -33,13 +39,6 @@
 import org.apache.maven.continuum.web.exception.ContinuumActionException;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /**
  * BuildDefinitionAction:
  *
@@ -72,7 +71,7 @@
 
     private boolean buildFresh;
 
-    private Map schedules;
+    private Map<Integer, String> schedules;
 
     private List profiles;
 
@@ -105,15 +104,13 @@
 
         if ( schedules == null )
         {
-            schedules = new HashMap();
+            schedules = new HashMap<Integer, String>();
 
-            Collection allSchedules = getContinuum().getSchedules();
+            Collection<Schedule> allSchedules = getContinuum().getSchedules();
 
-            for ( Iterator i = allSchedules.iterator(); i.hasNext(); )
+            for ( Schedule schedule : allSchedules )
             {
-                Schedule schedule = (Schedule) i.next();
-
-                schedules.put( new Integer( schedule.getId() ), schedule.getName() );
+                schedules.put( schedule.getId(), schedule.getName() );
             }
         }
 
@@ -213,22 +210,23 @@
                 {
                     if ( ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR.equals( executor ) )
                     {
-                        buildFile = ( (BuildDefinition) buildDefinitionService
-                            .getDefaultMavenTwoBuildDefinitionTemplate().getBuildDefinitions().get( 0 ) )
-                            .getBuildFile();
+                        buildFile =
+                            ( (BuildDefinition) buildDefinitionService.getDefaultMavenTwoBuildDefinitionTemplate().getBuildDefinitions().get(
+                                0 ) ).getBuildFile();
                         buildDefinitionType = ContinuumBuildExecutorConstants.MAVEN_TWO_BUILD_EXECUTOR;
                     }
                     else if ( ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR.equals( executor ) )
                     {
-                        buildFile = ( (BuildDefinition) buildDefinitionService
-                            .getDefaultMavenOneBuildDefinitionTemplate().getBuildDefinitions().get( 0 ) )
-                            .getBuildFile();
+                        buildFile =
+                            ( (BuildDefinition) buildDefinitionService.getDefaultMavenOneBuildDefinitionTemplate().getBuildDefinitions().get(
+                                0 ) ).getBuildFile();
                         buildDefinitionType = ContinuumBuildExecutorConstants.MAVEN_ONE_BUILD_EXECUTOR;
                     }
                     else if ( ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR.equals( executor ) )
                     {
-                        buildFile = ( (BuildDefinition) buildDefinitionService.getDefaultAntBuildDefinitionTemplate()
-                            .getBuildDefinitions().get( 0 ) ).getBuildFile();
+                        buildFile =
+                            ( (BuildDefinition) buildDefinitionService.getDefaultAntBuildDefinitionTemplate().getBuildDefinitions().get(
+                                0 ) ).getBuildFile();
                         buildDefinitionType = ContinuumBuildExecutorConstants.ANT_BUILD_EXECUTOR;
                     }
                     else
@@ -579,12 +577,12 @@
         this.buildFresh = buildFresh;
     }
 
-    public Map getSchedules()
+    public Map<Integer, String> getSchedules()
     {
         return schedules;
     }
 
-    public void setSchedules( final Map schedules )
+    public void setSchedules( final Map<Integer, String> schedules )
     {
         this.schedules = schedules;
     }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildProjectAction.java Wed Apr 15 20:22:00 2009
@@ -80,11 +80,11 @@
 
         if ( projectId > 0 )
         {
-            if ( fromGroupPage == true )
+            if ( fromGroupPage )
             {
                 return "to_group_page";
             }
-            if ( fromProjectPage == true )
+            if ( fromProjectPage )
             {
                 return "to_project_page";
             }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultAction.java Wed Apr 15 20:22:00 2009
@@ -19,11 +19,17 @@
  * under the License.
  */
 
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.commons.io.IOUtils;
 import org.apache.commons.lang.StringEscapeUtils;
-import org.apache.continuum.buildmanager.BuildManagerException;
 import org.apache.continuum.builder.distributed.manager.DistributedBuildManager;
 import org.apache.continuum.builder.utils.ContinuumBuildConstant;
+import org.apache.continuum.buildmanager.BuildManagerException;
 import org.apache.maven.continuum.ContinuumException;
 import org.apache.maven.continuum.configuration.ConfigurationException;
 import org.apache.maven.continuum.model.project.BuildResult;
@@ -35,12 +41,6 @@
 import org.codehaus.plexus.util.FileUtils;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.List;
-import java.util.Map;
-
 
 /**
  * @author <a href="mailto:evenisse@apache.org">Emmanuel Venisse</a>
@@ -89,7 +89,8 @@
         // check if there are surefire results to display
         project = getContinuum().getProject( getProjectId() );
 
-        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() && project.getState() == ContinuumProjectState.BUILDING )
+        if ( getContinuum().getConfiguration().isDistributedBuildEnabled() &&
+            project.getState() == ContinuumProjectState.BUILDING )
         {
             Map<String, Object> map = distributedBuildManager.getBuildResult( project.getId() );
 
@@ -120,19 +121,13 @@
             File surefireReportsDirectory =
                 getContinuum().getConfiguration().getTestReportsDirectory( buildId, getProjectId() );
             File[] files = surefireReportsDirectory.listFiles();
-            if ( files == null )
-            {
-                hasSurefireResults = false;
-            }
-            else
-            {
-                hasSurefireResults = files.length > 0;
-            }
+            hasSurefireResults = files != null && files.length > 0;
             changeSet = getContinuum().getChangesSinceLastSuccess( getProjectId(), getBuildId() );
 
             buildOutput = getBuildOutputText();
 
-            state = StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath() );
+            state =
+                StateGenerator.generate( buildResult.getState(), ServletActionContext.getRequest().getContextPath() );
 
             this.setCanDelete( this.canRemoveBuildResult( buildResult ) );
         }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/BuildResultsListAction.java Wed Apr 15 20:22:00 2009
@@ -25,6 +25,7 @@
 
 import org.apache.continuum.buildmanager.BuildManagerException;
 import org.apache.maven.continuum.ContinuumException;
+import org.apache.maven.continuum.model.project.BuildResult;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.web.exception.AuthorizationRequiredException;
 import org.codehaus.plexus.util.StringUtils;
@@ -39,11 +40,11 @@
 public class BuildResultsListAction
     extends AbstractBuildAction
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( BuildResultsListAction.class );
 
     private Project project;
 
-    private Collection buildResults;
+    private Collection<BuildResult> buildResults;
 
     private Collection<String> selectedBuildResults;
 
@@ -150,7 +151,7 @@
         this.projectId = projectId;
     }
 
-    public Collection getBuildResults()
+    public Collection<BuildResult> getBuildResults()
     {
         return buildResults;
     }
@@ -181,12 +182,12 @@
         return projectGroupName;
     }
 
-    public Collection getSelectedBuildResults()
+    public Collection<String> getSelectedBuildResults()
     {
         return selectedBuildResults;
     }
 
-    public void setSelectedBuildResults( Collection selectedBuildResults )
+    public void setSelectedBuildResults( Collection<String> selectedBuildResults )
     {
         this.selectedBuildResults = selectedBuildResults;
     }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/CancelBuildAction.java Wed Apr 15 20:22:00 2009
@@ -44,179 +44,180 @@
  * @plexus.component role="com.opensymphony.xwork2.Action" role-hint="cancelBuild"
  */
 public class CancelBuildAction
-	extends ContinuumActionSupport
+    extends ContinuumActionSupport
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( CancelBuildAction.class );
 
-	private int projectId;
-	
-	private int projectGroupId;
-	
-	private List<String> selectedProjects;
-	
-	private String projectGroupName = "";
-	
-	public String execute()
-	    throws ContinuumException
-	{
-	    try
-	    {
-	        checkBuildProjectInGroupAuthorization( getProjectGroupName() );
-	
-	        BuildsManager buildsManager = getContinuum().getBuildsManager();
-	        
-	        buildsManager.cancelBuild( projectId );
-	    }
-	    catch ( AuthorizationRequiredException e )
-	    {
-	        return REQUIRES_AUTHORIZATION;
-	    }
-	    catch ( BuildManagerException e )
-	    {
-	        throw new ContinuumException( "Error while canceling build", e );
-	    }
-	
-	    return SUCCESS;
-	}
-	
-	public String cancelBuilds()
-	    throws ContinuumException
-	{
-	    if ( getSelectedProjects() == null || getSelectedProjects().isEmpty() )
-	    {
-	        return SUCCESS;
-	    }
-	    int[] projectsId = new int[getSelectedProjects().size()];
-	    for ( String selectedProjectId : getSelectedProjects() )
-	    {
-	        int projectId = Integer.parseInt( selectedProjectId );
-	        projectsId = ArrayUtils.add( projectsId, projectId );
-	    }
-	
-	    BuildsManager parallelBuildsManager = getContinuum().getBuildsManager();
-	    parallelBuildsManager.removeProjectsFromBuildQueue( projectsId );           
-	    
-	    try
-	    {
-	        // now we must check if the current build is one of this
-	        int index = ArrayUtils.indexOf( projectsId, getCurrentProjectIdBuilding() );
-	        if ( index > 0 )
-	        {
-	            getContinuum().getBuildsManager().cancelBuild( projectsId[index] );
-	        }
-	        
-	    }
-	    catch ( BuildManagerException e )
-	    {
-	        logger.error( e.getMessage() );
-	        throw new ContinuumException( e.getMessage(), e );
-	    }
-	
-	    return SUCCESS;
-	}
-	
-	public String cancelGroupBuild()
-	    throws ContinuumException
-	{
-	    try
-	    {
-	        checkBuildProjectInGroupAuthorization( getContinuum().getProjectGroup( projectGroupId).getName() );
-	    }
-	    catch ( AuthorizationRequiredException e )
-	    {
-	        return REQUIRES_AUTHORIZATION;
-	    }
-	
-	    BuildsManager buildsManager = getContinuum().getBuildsManager();
-	
-	    List<ProjectScmRoot> scmRoots = getContinuum().getProjectScmRootByProjectGroup( projectGroupId );
-	    
-	    if ( scmRoots != null )
-	    {
-	        for ( ProjectScmRoot scmRoot : scmRoots )
-	        {
-	            try
-	            {
-	                buildsManager.removeProjectGroupFromPrepareBuildQueue( projectGroupId, scmRoot.getScmRootAddress() );
-	                //taskQueueManager.removeFromPrepareBuildQueue( projectGroupId, scmRoot.getScmRootAddress() );
-	            }
-	            catch ( BuildManagerException e )
-	            {
-	                throw new ContinuumException( "Unable to cancel group build", e );
-	            }
-	        }
-	    }
-	    Collection<Project> projects = getContinuum().getProjectsInGroup( projectGroupId );
-	
-	    List<String> projectIds = new ArrayList<String>();
-	    
-	    for ( Project project : projects )
-	    {
-	        projectIds.add( Integer.toString( project.getId() ) );
-	    }
-	
-	    setSelectedProjects( projectIds );
-	
-	    return cancelBuilds();
-	}
-	
-	public void setProjectId( int projectId )
-	{
-	    this.projectId = projectId;
-	}
-	
-	public String getProjectGroupName()
-	    throws ContinuumException
-	{
-	    if ( StringUtils.isEmpty( projectGroupName ) )
-	    {
-	        projectGroupName = getContinuum().getProjectGroupByProjectId( projectId ).getName();
-	    }
-	
-	    return projectGroupName;
-	}
-	
-	public List<String> getSelectedProjects()
-	{
-	    return selectedProjects;
-	}
-	
-	public void setSelectedProjects( List<String> selectedProjects )
-	{
-	    this.selectedProjects = selectedProjects;
-	}
-	
-	public int getProjectGroupId()
-	{
-	    return projectGroupId;
-	}
-	
-	public void setProjectGroupId( int projectGroupId )
-	{
-	    this.projectGroupId = projectGroupId;
-	}
-	
-	/**
-	 * @return -1 if not project currently building
-	 * @throws ContinuumException
-	 */
-	protected int getCurrentProjectIdBuilding()
-	    throws ContinuumException, BuildManagerException
-	{
-	    Map<String, Task> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
-	    Set<String> keySet = currentBuilds.keySet();
-	    
-	    for( String key : keySet )
-	    {
-	        Task task = currentBuilds.get( key );
-	        if ( task != null )
-	        {
-	            if ( task instanceof BuildProjectTask )
-	            {
-	                return ( (BuildProjectTask) task ).getProjectId();
-	            }
-	        }
-	    }        
-	    return -1;
-	}
+    private int projectId;
+
+    private int projectGroupId;
+
+    private List<String> selectedProjects;
+
+    private String projectGroupName = "";
+
+    public String execute()
+        throws ContinuumException
+    {
+        try
+        {
+            checkBuildProjectInGroupAuthorization( getProjectGroupName() );
+
+            BuildsManager buildsManager = getContinuum().getBuildsManager();
+
+            buildsManager.cancelBuild( projectId );
+        }
+        catch ( AuthorizationRequiredException e )
+        {
+            return REQUIRES_AUTHORIZATION;
+        }
+        catch ( BuildManagerException e )
+        {
+            throw new ContinuumException( "Error while canceling build", e );
+        }
+
+        return SUCCESS;
+    }
+
+    public String cancelBuilds()
+        throws ContinuumException
+    {
+        if ( getSelectedProjects() == null || getSelectedProjects().isEmpty() )
+        {
+            return SUCCESS;
+        }
+        int[] projectsId = new int[getSelectedProjects().size()];
+        for ( String selectedProjectId : getSelectedProjects() )
+        {
+            int projectId = Integer.parseInt( selectedProjectId );
+            projectsId = ArrayUtils.add( projectsId, projectId );
+        }
+
+        BuildsManager parallelBuildsManager = getContinuum().getBuildsManager();
+        parallelBuildsManager.removeProjectsFromBuildQueue( projectsId );
+
+        try
+        {
+            // now we must check if the current build is one of this
+            int index = ArrayUtils.indexOf( projectsId, getCurrentProjectIdBuilding() );
+            if ( index > 0 )
+            {
+                getContinuum().getBuildsManager().cancelBuild( projectsId[index] );
+            }
+
+        }
+        catch ( BuildManagerException e )
+        {
+            logger.error( e.getMessage() );
+            throw new ContinuumException( e.getMessage(), e );
+        }
+
+        return SUCCESS;
+    }
+
+    public String cancelGroupBuild()
+        throws ContinuumException
+    {
+        try
+        {
+            checkBuildProjectInGroupAuthorization( getContinuum().getProjectGroup( projectGroupId ).getName() );
+        }
+        catch ( AuthorizationRequiredException e )
+        {
+            return REQUIRES_AUTHORIZATION;
+        }
+
+        BuildsManager buildsManager = getContinuum().getBuildsManager();
+
+        List<ProjectScmRoot> scmRoots = getContinuum().getProjectScmRootByProjectGroup( projectGroupId );
+
+        if ( scmRoots != null )
+        {
+            for ( ProjectScmRoot scmRoot : scmRoots )
+            {
+                try
+                {
+                    buildsManager.removeProjectGroupFromPrepareBuildQueue( projectGroupId,
+                                                                           scmRoot.getScmRootAddress() );
+                    //taskQueueManager.removeFromPrepareBuildQueue( projectGroupId, scmRoot.getScmRootAddress() );
+                }
+                catch ( BuildManagerException e )
+                {
+                    throw new ContinuumException( "Unable to cancel group build", e );
+                }
+            }
+        }
+        Collection<Project> projects = getContinuum().getProjectsInGroup( projectGroupId );
+
+        List<String> projectIds = new ArrayList<String>();
+
+        for ( Project project : projects )
+        {
+            projectIds.add( Integer.toString( project.getId() ) );
+        }
+
+        setSelectedProjects( projectIds );
+
+        return cancelBuilds();
+    }
+
+    public void setProjectId( int projectId )
+    {
+        this.projectId = projectId;
+    }
+
+    public String getProjectGroupName()
+        throws ContinuumException
+    {
+        if ( StringUtils.isEmpty( projectGroupName ) )
+        {
+            projectGroupName = getContinuum().getProjectGroupByProjectId( projectId ).getName();
+        }
+
+        return projectGroupName;
+    }
+
+    public List<String> getSelectedProjects()
+    {
+        return selectedProjects;
+    }
+
+    public void setSelectedProjects( List<String> selectedProjects )
+    {
+        this.selectedProjects = selectedProjects;
+    }
+
+    public int getProjectGroupId()
+    {
+        return projectGroupId;
+    }
+
+    public void setProjectGroupId( int projectGroupId )
+    {
+        this.projectGroupId = projectGroupId;
+    }
+
+    /**
+     * @return -1 if not project currently building
+     * @throws ContinuumException
+     */
+    protected int getCurrentProjectIdBuilding()
+        throws ContinuumException, BuildManagerException
+    {
+        Map<String, Task> currentBuilds = getContinuum().getBuildsManager().getCurrentBuilds();
+        Set<String> keySet = currentBuilds.keySet();
+
+        for ( String key : keySet )
+        {
+            Task task = currentBuilds.get( key );
+            if ( task != null )
+            {
+                if ( task instanceof BuildProjectTask )
+                {
+                    return ( (BuildProjectTask) task ).getProjectId();
+                }
+            }
+        }
+        return -1;
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ContinuumActionSupport.java Wed Apr 15 20:22:00 2009
@@ -19,11 +19,12 @@
  * under the License.
  */
 
+import com.opensymphony.xwork2.ActionContext;
+import com.opensymphony.xwork2.Preparable;
+
 import java.text.SimpleDateFormat;
 import java.util.ResourceBundle;
 
-import com.opensymphony.xwork2.ActionContext;
-import com.opensymphony.xwork2.Preparable;
 import org.apache.maven.continuum.Continuum;
 import org.apache.maven.continuum.security.ContinuumRoleConstants;
 import org.apache.maven.continuum.web.exception.AuthenticationRequiredException;
@@ -65,8 +66,8 @@
      * @plexus.requirement
      */
     private Continuum continuum;
-    
-    protected SimpleDateFormat dateFormatter = new SimpleDateFormat("MMM dd, yyyy hh:mm:ss aaa z");
+
+    protected final SimpleDateFormat dateFormatter = new SimpleDateFormat( "MMM dd, yyyy hh:mm:ss aaa z" );
 
     public void prepare()
         throws Exception
@@ -461,9 +462,10 @@
     }
 
     /**
-     * Check if the current user is authorized to manage queues 
-     * 
-     * @throws AuthenticationRequiredException if the user isn't authenticated
+     * Check if the current user is authorized to manage queues
+     *
+     * @throws AuthenticationRequiredException
+     *                                        if the user isn't authenticated
      * @throws AuthorizationRequiredException if the user isn't authorized
      */
     protected void checkManageQueuesAuthorization()
@@ -473,16 +475,16 @@
         {
             throw new AuthenticationRequiredException( "Authentication required" );
         }
-        
+
         checkAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_QUEUES );
     }
-    
+
     protected void checkManageLocalRepositoriesAuthorization()
         throws AuthorizationRequiredException
-    {   
+    {
         checkAuthorization( ContinuumRoleConstants.CONTINUUM_MANAGE_REPOSITORIES );
     }
-    
+
     /**
      * Get the security session
      *
@@ -537,9 +539,9 @@
 
         return true;
     }
-    
+
     protected ResourceBundle getResourceBundle()
     {
         return getTexts( "localization/Continuum" );
-    }    
+    }
 }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/GroupSummaryAction.java Wed Apr 15 20:22:00 2009
@@ -39,7 +39,7 @@
 public class GroupSummaryAction
     extends ContinuumActionSupport
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( GroupSummaryAction.class );
 
     private String infoMessage;
 

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectGroupAction.java Wed Apr 15 20:22:00 2009
@@ -66,9 +66,9 @@
 public class ProjectGroupAction
     extends ContinuumConfirmAction
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( ProjectGroupAction.class );
 
-    private final static Map FILTER_CRITERIA = new HashMap();
+    private static final Map<String, String> FILTER_CRITERIA = new HashMap<String, String>();
 
     static
     {
@@ -102,20 +102,20 @@
 
     private Map projects = new HashMap();
 
-    private Map projectGroups = new HashMap();
+    private Map<Integer, String> projectGroups = new HashMap<Integer, String>();
 
     private boolean confirmed;
 
     private boolean projectInCOQueue = false;
 
-    private Collection projectList;
+    private Collection<Project> projectList;
 
-    private List projectGroupUsers;
+    private List<ProjectGroupUserBean> projectGroupUsers;
 
     private String filterProperty;
 
     private String filterKey;
-    
+
     //Default order is by username
     private String sorterProperty = "username";
 
@@ -169,10 +169,9 @@
 
                 if ( !buildDefinition.isDefaultForProject() )
                 {
-                    String key =
-                        StringUtils.isEmpty( buildDefinition.getDescription() ) ? buildDefinition.getGoals()
-                                        : buildDefinition.getDescription();
-                    buildDefinitions.put( key, Integer.valueOf( buildDefinition.getId() ) );
+                    String key = StringUtils.isEmpty( buildDefinition.getDescription() ) ? buildDefinition.getGoals()
+                        : buildDefinition.getDescription();
+                    buildDefinitions.put( key, buildDefinition.getId() );
                 }
             }
         }
@@ -193,11 +192,10 @@
                 // get the projects according to build order (first project in the group is the root project)
                 try
                 {
-                    Project rootProject =
-                        ( getContinuum().getProjectsInBuildOrder( getContinuum().getProjectsInGroupWithDependencies(
-                                                                                                                     projectGroupId ) ) ).get( 0 );
-                    if ( "maven2".equals( rootProject.getExecutorId() )
-                        || "maven-1".equals( rootProject.getExecutorId() ) )
+                    Project rootProject = ( getContinuum().getProjectsInBuildOrder(
+                        getContinuum().getProjectsInGroupWithDependencies( projectGroupId ) ) ).get( 0 );
+                    if ( "maven2".equals( rootProject.getExecutorId() ) ||
+                        "maven-1".equals( rootProject.getExecutorId() ) )
                     {
                         url = rootProject.getUrl();
                     }
@@ -336,11 +334,8 @@
 
         if ( projectList != null )
         {
-            Iterator proj = projectList.iterator();
-
-            while ( proj.hasNext() )
+            for ( Project p : projectList )
             {
-                Project p = (Project) proj.next();
                 try
                 {
                     if ( parallelBuildsManager.isInAnyCheckoutQueue( p.getId() ) )
@@ -352,17 +347,15 @@
                 {
                     throw new ContinuumException( e.getMessage(), e );
                 }
-                projects.put( p, new Integer( p.getProjectGroup().getId() ) );
+                projects.put( p, p.getProjectGroup().getId() );
             }
         }
 
-        Iterator proj_group = getContinuum().getAllProjectGroupsWithProjects().iterator();
-        while ( proj_group.hasNext() )
+        for ( ProjectGroup pg : getContinuum().getAllProjectGroupsWithProjects() )
         {
-            ProjectGroup pg = (ProjectGroup) proj_group.next();
             if ( isAuthorized( projectGroup.getName() ) )
             {
-                projectGroups.put( new Integer( pg.getId() ), pg.getName() );
+                projectGroups.put( pg.getId(), pg.getName() );
             }
         }
         repositories = getContinuum().getRepositoryService().getAllLocalRepositories();
@@ -519,7 +512,7 @@
                 }
             }
 
-            ProjectGroup newProjectGroup = getContinuum().getProjectGroupWithProjects( new Integer( id[0] ).intValue() );
+            ProjectGroup newProjectGroup = getContinuum().getProjectGroupWithProjects( new Integer( id[0] ) );
 
             if ( newProjectGroup.getId() != projectGroup.getId() && isAuthorized( newProjectGroup.getName() ) )
             {
@@ -598,12 +591,8 @@
 
         if ( projectList != null )
         {
-            Iterator proj = projectList.iterator();
-
-            while ( proj.hasNext() )
+            for ( Project p : projectList )
             {
-                Project p = (Project) proj.next();
-
                 if ( p.getState() != ContinuumProjectState.OK )
                 {
                     allBuildsOk = false;
@@ -650,22 +639,18 @@
         }
     }
 
-    private boolean isParentInProjectGroup( ProjectDependency parent, Collection projectsInGroup )
+    private boolean isParentInProjectGroup( ProjectDependency parent, Collection<Project> projectsInGroup )
         throws ContinuumException
     {
         boolean result = false;
 
-        Iterator projectsIterator = projectsInGroup.iterator();
-
-        while ( projectsIterator.hasNext() )
+        for ( Project project : projectsInGroup )
         {
-            Project project = (Project) projectsIterator.next();
-
             if ( parent != null )
             {
-                if ( ( project.getArtifactId().equals( parent.getArtifactId() ) )
-                    && ( project.getGroupId().equals( parent.getGroupId() ) )
-                    && ( project.getVersion().equals( parent.getVersion() ) ) )
+                if ( ( project.getArtifactId().equals( parent.getArtifactId() ) ) &&
+                    ( project.getGroupId().equals( parent.getGroupId() ) ) &&
+                    ( project.getVersion().equals( parent.getVersion() ) ) )
                 {
                     result = true;
                 }
@@ -714,7 +699,7 @@
             sortUsers( users, sorterProperty, ascending );
         }
 
-        projectGroupUsers = new ArrayList();
+        projectGroupUsers = new ArrayList<ProjectGroupUserBean>();
 
         if ( users == null )
         {
@@ -731,12 +716,10 @@
 
             try
             {
-                Collection effectiveRoles = rbac.getEffectivelyAssignedRoles( user.getUsername() );
+                Collection<Role> effectiveRoles = rbac.getEffectivelyAssignedRoles( user.getUsername() );
 
-                for ( Iterator j = effectiveRoles.iterator(); j.hasNext(); )
+                for ( Role role : effectiveRoles )
                 {
-                    Role role = (Role) j.next();
-
                     if ( role.getName().indexOf( projectGroup.getName() ) > -1 )
                     {
                         pgUser.setRoles( effectiveRoles );
@@ -756,7 +739,7 @@
         }
     }
 
-    private List<User> findUsers( List<User> users, String searchProperty, String searchKey)
+    private List<User> findUsers( List<User> users, String searchProperty, String searchKey )
     {
         List<User> userList = new ArrayList<User>();
         for ( User user : users )
@@ -798,7 +781,7 @@
 
         return userList;
     }
-    
+
     private void sortUsers( List<User> userList, final String sorterProperty, final boolean orderAscending )
     {
         Collections.sort( userList, new Comparator<User>()
@@ -895,7 +878,7 @@
         return projectGroups;
     }
 
-    public void setProjectGroups( Map projectGroups )
+    public void setProjectGroups( Map<Integer, String> projectGroups )
     {
         this.projectGroups = projectGroups;
     }
@@ -1087,7 +1070,7 @@
             return false;
         }
     }
-    
+
     public String getSorterProperty()
     {
         return sorterProperty;

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectViewAction.java Wed Apr 15 20:22:00 2009
@@ -37,7 +37,7 @@
 public class ProjectViewAction
     extends ContinuumActionSupport
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( ProjectViewAction.class );
 
     private Project project;
 
@@ -45,15 +45,10 @@
 
     private String lastBuildDateTime;
 
-    /**
-     * Target {@link ProjectGroup} to view.
-     */
-    private ProjectGroup projectGroup;
-
     public String execute()
         throws ContinuumException
     {
-        projectGroup = getProjectGroup();
+        ProjectGroup projectGroup = getProjectGroup();
 
         try
         {

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ProjectsListAction.java Wed Apr 15 20:22:00 2009
@@ -20,7 +20,6 @@
  */
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.maven.continuum.ContinuumException;
@@ -40,7 +39,7 @@
 public class ProjectsListAction
     extends ContinuumActionSupport
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( ProjectsListAction.class );
 
     private List<String> selectedProjects;
 
@@ -143,9 +142,9 @@
         if ( selectedProjects != null && !selectedProjects.isEmpty() )
         {
             ArrayList<Project> projectsList = new ArrayList<Project>();
-            for ( Iterator i = selectedProjects.iterator(); i.hasNext(); )
+            for ( String pId : selectedProjects )
             {
-                int projectId = Integer.parseInt( (String) i.next() );
+                int projectId = Integer.parseInt( pId );
                 Project p = getContinuum().getProjectWithAllDetails( projectId );
                 projectsList.add( p );
             }

Modified: continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java?rev=765340&r1=765339&r2=765340&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java (original)
+++ continuum/branches/continuum-1.3.x/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ScheduleAction.java Wed Apr 15 20:22:00 2009
@@ -43,7 +43,7 @@
     extends ContinuumConfirmAction
     implements Preparable
 {
-    private Logger logger = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger logger = LoggerFactory.getLogger( ScheduleAction.class );
 
     private int id;
 



Mime
View raw message