continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r765355 [2/5] - in /continuum/trunk: continuum-api/src/main/java/org/apache/continuum/taskqueue/ continuum-api/src/main/java/org/apache/continuum/utils/shell/ continuum-api/src/main/java/org/apache/maven/continuum/build/settings/ continuum-...
Date Wed, 15 Apr 2009 20:59:11 GMT
Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/manager/DefaultBuildAgentReleaseManager.java Wed Apr 15 20:59:07 2009
@@ -47,7 +47,7 @@
 public class DefaultBuildAgentReleaseManager
     implements BuildAgentReleaseManager
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DefaultBuildAgentReleaseManager.class );
 
     /**
      * @plexus.requirement
@@ -64,7 +64,8 @@
      */
     BuildAgentInstallationService buildAgentInstallationService;
 
-    public String releasePrepare( Map projectMap, Map properties, Map releaseVersion, Map developmentVersion, Map<String, String> environments )
+    public String releasePrepare( Map projectMap, Map properties, Map releaseVersion, Map developmentVersion,
+                                  Map<String, String> environments )
         throws ContinuumReleaseException
     {
         Project project = getProject( projectMap );
@@ -75,11 +76,14 @@
 
         String workingDirectory = buildAgentConfigurationService.getWorkingDirectory( project.getId() ).getPath();
 
-        String executable = buildAgentInstallationService.getExecutorConfigurator( BuildAgentInstallationService.MAVEN2_TYPE ).getExecutable();
+        String executable = buildAgentInstallationService.getExecutorConfigurator(
+            BuildAgentInstallationService.MAVEN2_TYPE ).getExecutable();
 
         if ( environments != null )
         {
-            String m2Home = environments.get( buildAgentInstallationService.getEnvVar( BuildAgentInstallationService.MAVEN2_TYPE ) );
+            String m2Home =
+                environments.get( buildAgentInstallationService.getEnvVar( BuildAgentInstallationService.MAVEN2_TYPE ) )
+                ;
             if ( StringUtils.isNotEmpty( m2Home ) )
             {
                 executable = m2Home + File.separator + "bin" + File.separator + executable;
@@ -103,15 +107,16 @@
         return (ReleaseResult) releaseManager.getReleaseResults().get( releaseId );
     }
 
-    public Map getListener( String releaseId )
+    public Map<String, Object> getListener( String releaseId )
     {
-        ContinuumReleaseManagerListener listener = (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
+        ContinuumReleaseManagerListener listener =
+            (ContinuumReleaseManagerListener) releaseManager.getListeners().get( releaseId );
 
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
 
         if ( listener != null )
-        { 
-            map.put( ContinuumBuildAgentUtil.KEY_RELEASE_STATE, new Integer( listener.getState() ) );
+        {
+            map.put( ContinuumBuildAgentUtil.KEY_RELEASE_STATE, listener.getState() );
             if ( listener.getPhases() != null )
             {
                 map.put( ContinuumBuildAgentUtil.KEY_RELEASE_PHASES, listener.getPhases() );
@@ -151,7 +156,8 @@
         return "";
     }
 
-    public void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile, Map repository )
+    public void releasePerform( String releaseId, String goals, String arguments, boolean useReleaseProfile,
+                                Map repository )
         throws ContinuumReleaseException
     {
         ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
@@ -166,15 +172,16 @@
             repo.setLocation( ContinuumBuildAgentUtil.getLocalRepository( repository ) );
         }
 
-        File performDirectory = new File( buildAgentConfigurationService.getWorkingDirectory(),
-                                          "releases-" + System.currentTimeMillis() );
+        File performDirectory =
+            new File( buildAgentConfigurationService.getWorkingDirectory(), "releases-" + System.currentTimeMillis() );
         performDirectory.mkdirs();
 
         releaseManager.perform( releaseId, performDirectory, goals, arguments, useReleaseProfile, listener, repo );
     }
 
-    public String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository, String scmUrl, 
-                                         String scmUsername, String scmPassword, String scmTag, String scmTagBase, Map<String, String> environments )
+    public String releasePerformFromScm( String goals, String arguments, boolean useReleaseProfile, Map repository,
+                                         String scmUrl, String scmUsername, String scmPassword, String scmTag,
+                                         String scmTagBase, Map<String, String> environments )
         throws ContinuumReleaseException
     {
         ContinuumReleaseDescriptor descriptor = new ContinuumReleaseDescriptor();
@@ -222,7 +229,8 @@
     {
         ContinuumReleaseManagerListener listener = new DefaultReleaseManagerListener();
 
-        releaseManager.rollback( releaseId, buildAgentConfigurationService.getWorkingDirectory( projectId ).getPath(), listener );
+        releaseManager.rollback( releaseId, buildAgentConfigurationService.getWorkingDirectory( projectId ).getPath(),
+                                 listener );
 
         //recurse until rollback is finished
         while ( listener.getState() != ContinuumReleaseManagerListener.FINISHED )
@@ -291,7 +299,7 @@
         }
 
         prop = ContinuumBuildAgentUtil.getScmCommentPrefix( context );
-        if ( StringUtils.isNotBlank( prop ) );
+        if ( StringUtils.isNotBlank( prop ) )
         {
             props.put( "commentPrefix", prop );
         }
@@ -301,7 +309,7 @@
         {
             props.put( "tag", prop );
         }
-        
+
         prop = ContinuumBuildAgentUtil.getPrepareGoals( context );
         if ( StringUtils.isNotBlank( prop ) )
         {
@@ -334,5 +342,5 @@
         return props;
     }
 
-    
+
 }

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/PrepareBuildProjectsTask.java Wed Apr 15 20:59:07 2009
@@ -27,15 +27,16 @@
 public class PrepareBuildProjectsTask
     implements Task
 {
-    private List<BuildContext> buildContexts;
+    private final List<BuildContext> buildContexts;
 
-    private int trigger;
+    private final int trigger;
 
-    private int projectGroupId;
+    private final int projectGroupId;
 
-    private String scmRootAddress;
+    private final String scmRootAddress;
 
-    public PrepareBuildProjectsTask( List<BuildContext> buildContexts, int trigger, int projectGroupId, String scmRootAddress )
+    public PrepareBuildProjectsTask( List<BuildContext> buildContexts, int trigger, int projectGroupId,
+                                     String scmRootAddress )
     {
         this.buildContexts = buildContexts;
         this.trigger = trigger;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/BuildProjectTaskExecutor.java Wed Apr 15 20:59:07 2009
@@ -69,7 +69,7 @@
 public class BuildProjectTaskExecutor
     implements TaskExecutor
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( BuildProjectTaskExecutor.class );
 
     /**
      * @plexus.requirement
@@ -124,8 +124,6 @@
 
         try
         {
-            Map actionContext = context.getActionContext();
-
             try
             {
                 performAction( "update-project-from-agent-working-directory", context );
@@ -398,7 +396,7 @@
     private boolean shouldBuild( BuildContext context )
         throws TaskExecutionException
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( ContinuumBuildAgentUtil.KEY_PROJECT_ID, context.getProjectId() );
         map.put( ContinuumBuildAgentUtil.KEY_BUILD_DEFINITION_ID, context.getBuildDefinitionId() );
         map.put( ContinuumBuildAgentUtil.KEY_TRIGGER, context.getTrigger() );
@@ -422,7 +420,7 @@
 
     private List getScmChanges( ScmResult scmResult )
     {
-        List scmChanges = new ArrayList();
+        List<Map<String, Object>> scmChanges = new ArrayList<Map<String, Object>>();
 
         if ( scmResult != null && scmResult.getChanges() != null )
         {
@@ -430,7 +428,7 @@
             {
                 ChangeSet changeSet = (ChangeSet) obj;
 
-                Map map = new HashMap();
+                Map<String, Object> map = new HashMap<String, Object>();
                 if ( StringUtils.isNotEmpty( changeSet.getAuthor() ) )
                 {
                     map.put( ContinuumBuildAgentUtil.KEY_CHANGESET_AUTHOR, changeSet.getAuthor() );
@@ -459,15 +457,15 @@
         return scmChanges;
     }
 
-    private List<Map> getScmChangeFiles( List<ChangeFile> files )
+    private List<Map<String, String>> getScmChangeFiles( List<ChangeFile> files )
     {
-        List<Map> scmChangeFiles = new ArrayList<Map>();
+        List<Map<String, String>> scmChangeFiles = new ArrayList<Map<String, String>>();
 
         if ( files != null )
         {
             for ( ChangeFile changeFile : files )
             {
-                Map map = new HashMap();
+                Map<String, String> map = new HashMap<String, String>();
 
                 if ( StringUtils.isNotEmpty( changeFile.getName() ) )
                 {
@@ -502,7 +500,7 @@
     private Map getMavenProject( BuildContext context )
         throws TaskExecutionException
     {
-        Map mavenProject = new HashMap();
+        Map<String, Object> mavenProject = new HashMap<String, Object>();
 
         try
         {

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/execution/PrepareBuildProjectsTaskExecutor.java Wed Apr 15 20:59:07 2009
@@ -53,7 +53,7 @@
 public class PrepareBuildProjectsTaskExecutor
     implements TaskExecutor
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( PrepareBuildProjectsTaskExecutor.class );
 
     /**
      * @plexus.requirement
@@ -351,7 +351,7 @@
     private void performAction( String actionName, BuildContext buildContext )
         throws TaskExecutionException
     {
-        TaskExecutionException exception = null;
+        TaskExecutionException exception;
 
         try
         {
@@ -382,7 +382,7 @@
 
     private void mergeScmResults( BuildContext buildContext )
     {
-        Map context = buildContext.getActionContext();
+        Map<String, Object> context = buildContext.getActionContext();
         ScmResult oldScmResult = ContinuumBuildAgentUtil.getOldScmResult( context, null );
         ScmResult newScmResult = ContinuumBuildAgentUtil.getScmResult( context, null );
 

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/taskqueue/manager/DefaultBuildAgentTaskQueueManager.java Wed Apr 15 20:59:07 2009
@@ -43,7 +43,7 @@
 public class DefaultBuildAgentTaskQueueManager
     implements BuildAgentTaskQueueManager, Contextualizable
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DefaultBuildAgentTaskQueueManager.class );
 
     /**
      * @plexus.requirement role-hint="build-agent"
@@ -87,14 +87,14 @@
     {
         return buildAgentPrepareBuildQueue;
     }
-    
+
     private void removeProjectsFromBuildQueue()
         throws TaskQueueManagerException
     {
         try
         {
             List<BuildProjectTask> queues = buildAgentBuildQueue.getQueueSnapshot();
-        
+
             if ( queues != null )
             {
                 for ( BuildProjectTask task : queues )
@@ -118,7 +118,7 @@
         throws TaskQueueManagerException
     {
         Task task = getBuildTaskQueueExecutor().getCurrentTask();
-        
+
         if ( task != null )
         {
             if ( task instanceof BuildProjectTask )
@@ -174,7 +174,7 @@
         try
         {
             List<BuildProjectTask> queues = buildAgentBuildQueue.getQueueSnapshot();
-        
+
             if ( queues != null )
             {
                 for ( BuildProjectTask task : queues )
@@ -205,12 +205,13 @@
         try
         {
             List<PrepareBuildProjectsTask> queues = buildAgentPrepareBuildQueue.getQueueSnapshot();
-        
+
             if ( queues != null )
             {
                 for ( PrepareBuildProjectsTask task : queues )
                 {
-                    if ( task.getProjectGroupId() == projectGroupId && task.getTrigger() == trigger && task.getScmRootAddress().equals( scmRootAddress ) )
+                    if ( task.getProjectGroupId() == projectGroupId && task.getTrigger() == trigger &&
+                        task.getScmRootAddress().equals( scmRootAddress ) )
                     {
                         log.info( "projects already in build queue" );
                         return true;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/ContinuumBuildAgentUtil.java Wed Apr 15 20:59:07 2009
@@ -23,6 +23,7 @@
 import java.io.PrintWriter;
 import java.io.StringWriter;
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
@@ -573,27 +574,17 @@
         }
         else
         {
-            List list = new ArrayList();
+            List<Object> list = new ArrayList<Object>();
 
             if ( obj instanceof Object[] )
             {
                 Object[] objA = (Object[]) obj;
 
-                for ( Object o : objA )
-                {
-                    if ( o instanceof Map )
-                    {
-                        list.add( (Map) o );
-                    }
-                    else
-                    {
-                        list.add( o );
-                    }
-                }
+                list.addAll( Arrays.asList( objA ) );
             }
             else
             {
-                list = (List) obj;
+                list = (List<Object>) obj;
             }
 
             return list;
@@ -744,9 +735,9 @@
         return result;
     }
 
-    private static List<Map> getScmChanges( ScmResult scmResult )
+    private static List<Map<String, Object>> getScmChanges( ScmResult scmResult )
     {
-        List<Map> scmChanges = new ArrayList<Map>();
+        List<Map<String, Object>> scmChanges = new ArrayList<Map<String, Object>>();
 
         List<ChangeSet> changes = scmResult.getChanges();
 
@@ -754,7 +745,7 @@
         {
             for ( ChangeSet cs : changes )
             {
-                Map changeSet = new HashMap();
+                Map<String, Object> changeSet = new HashMap<String, Object>();
 
                 if ( StringUtils.isNotEmpty( cs.getAuthor() ) )
                 {
@@ -785,15 +776,15 @@
         return scmChanges;
     }
 
-    private static List getChangeFiles( List<ChangeFile> changeFiles )
+    private static List<Map<String, String>> getChangeFiles( List<ChangeFile> changeFiles )
     {
-        List<Map> files = new ArrayList<Map>();
+        List<Map<String, String>> files = new ArrayList<Map<String, String>>();
 
         if ( changeFiles != null )
         {
             for ( ChangeFile file : changeFiles )
             {
-                Map changeFile = new HashMap();
+                Map<String, String> changeFile = new HashMap<String, String>();
                 if ( StringUtils.isNotEmpty( file.getName() ) )
                 {
                     changeFile.put( ContinuumBuildAgentUtil.KEY_CHANGEFILE_NAME, file.getName() );

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/utils/WorkingCopyContentGenerator.java Wed Apr 15 20:59:07 2009
@@ -14,12 +14,12 @@
  */
 public class WorkingCopyContentGenerator
 {
+    private static final DecimalFormat decFormatter = new DecimalFormat( "###.##" );
+
     private File basedir;
 
     private String urlParamSeparator;
 
-    private static DecimalFormat decFormatter = new DecimalFormat( "###.##" );
-
     private static final long KILO = 1024;
 
     private static final long MEGA = 1024 * KILO;

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java (original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-webapp/src/main/java/org/apache/continuum/web/startup/BuildAgentStartup.java Wed Apr 15 20:59:07 2009
@@ -13,9 +13,9 @@
 public class BuildAgentStartup
     implements ServletContextListener
 {
-    private Logger log = LoggerFactory.getLogger( getClass() );
-    
-    /** 
+    private static final Logger log = LoggerFactory.getLogger( BuildAgentStartup.class );
+
+    /**
      * @see javax.servlet.ServletContextListener#contextDestroyed(javax.servlet.ServletContextEvent)
      */
     public void contextDestroyed( ServletContextEvent sce )
@@ -23,30 +23,30 @@
         // nothing to do here
 
     }
-    
-    /** 
+
+    /**
      * @see javax.servlet.ServletContextListener#contextInitialized(javax.servlet.ServletContextEvent)
      */
     public void contextInitialized( ServletContextEvent sce )
     {
         log.info( "Initializing Build Agent Task Queue Executor" );
 
-        WebApplicationContext wac = WebApplicationContextUtils.getRequiredWebApplicationContext( sce
-            .getServletContext() );
-        
-        TaskQueueExecutor buildAgent = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "build-agent" ) );
-
-        TaskQueueExecutor prepareBuildAgent = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "prepare-build-agent" ) );
+        WebApplicationContext wac =
+            WebApplicationContextUtils.getRequiredWebApplicationContext( sce.getServletContext() );
+
+        TaskQueueExecutor buildAgent = (TaskQueueExecutor) wac.getBean(
+            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "build-agent" ) );
+
+        TaskQueueExecutor prepareBuildAgent = (TaskQueueExecutor) wac.getBean(
+            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "prepare-build-agent" ) );
 
-        TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "prepare-release" ) );
+        TaskQueueExecutor prepareRelease = (TaskQueueExecutor) wac.getBean(
+            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "prepare-release" ) );
 
-        TaskQueueExecutor performRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "perform-release" ) );
+        TaskQueueExecutor performRelease = (TaskQueueExecutor) wac.getBean(
+            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "perform-release" ) );
 
-        TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean( PlexusToSpringUtils
-            .buildSpringId( TaskQueueExecutor.class, "rollback-release" ) ); 
+        TaskQueueExecutor rollbackRelease = (TaskQueueExecutor) wac.getBean(
+            PlexusToSpringUtils.buildSpringId( TaskQueueExecutor.class, "rollback-release" ) );
     }
 }

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/DistributedBuildProjectTaskExecutor.java Wed Apr 15 20:59:07 2009
@@ -57,7 +57,7 @@
 public class DistributedBuildProjectTaskExecutor
     implements DistributedBuildTaskExecutor
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DistributedBuildProjectTaskExecutor.class );
 
     private String buildAgentUrl;
 
@@ -105,9 +105,9 @@
             SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
 
             log.info( "initializing buildContext" );
-            List buildContext = initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
-                                                        prepareBuildTask.getTrigger(),
-                                                        prepareBuildTask.getScmRootAddress() );
+            List<Map<String, Object>> buildContext =
+                initializeBuildContext( prepareBuildTask.getProjectsBuildDefinitionsMap(),
+                                        prepareBuildTask.getTrigger(), prepareBuildTask.getScmRootAddress() );
 
             startTime = System.currentTimeMillis();
             client.buildProjects( buildContext );
@@ -126,11 +126,11 @@
         }
     }
 
-    private List initializeBuildContext( Map<Integer, Integer> projectsAndBuildDefinitions, int trigger,
-                                         String scmRootAddress )
+    private List<Map<String, Object>> initializeBuildContext( Map<Integer, Integer> projectsAndBuildDefinitions,
+                                                              int trigger, String scmRootAddress )
         throws ContinuumException
     {
-        List buildContext = new ArrayList();
+        List<Map<String, Object>> buildContext = new ArrayList<Map<String, Object>>();
         List<Project> projects = new ArrayList<Project>();
 
         try
@@ -156,7 +156,7 @@
                 BuildDefinition buildDef = buildDefinitionDao.getBuildDefinition( buildDefinitionId );
                 BuildResult buildResult = buildResultDao.getLatestBuildResultForProject( project.getId() );
 
-                Map context = new HashMap();
+                Map<String, Object> context = new HashMap<String, Object>();
 
                 context.put( ContinuumBuildConstant.KEY_PROJECT_GROUP_ID, project.getProjectGroup().getId() );
                 context.put( ContinuumBuildConstant.KEY_PROJECT_GROUP_NAME, project.getProjectGroup().getName() );
@@ -303,9 +303,9 @@
         return scmChanges;
     }
 
-    private List getScmChanges( ScmResult scmResult )
+    private List<Map<String, Object>> getScmChanges( ScmResult scmResult )
     {
-        List scmChanges = new ArrayList();
+        List<Map<String, Object>> scmChanges = new ArrayList<Map<String, Object>>();
 
         if ( scmResult != null && scmResult.getChanges() != null )
         {
@@ -313,7 +313,7 @@
             {
                 ChangeSet changeSet = (ChangeSet) obj;
 
-                Map map = new HashMap();
+                Map<String, Object> map = new HashMap<String, Object>();
                 if ( StringUtils.isNotEmpty( changeSet.getAuthor() ) )
                 {
                     map.put( ContinuumBuildConstant.KEY_CHANGESET_AUTHOR, changeSet.getAuthor() );
@@ -342,15 +342,15 @@
         return scmChanges;
     }
 
-    private List<Map> getScmChangeFiles( List<ChangeFile> files )
+    private List<Map<String, String>> getScmChangeFiles( List<ChangeFile> files )
     {
-        List<Map> scmChangeFiles = new ArrayList<Map>();
+        List<Map<String, String>> scmChangeFiles = new ArrayList<Map<String, String>>();
 
         if ( files != null )
         {
             for ( ChangeFile changeFile : files )
             {
-                Map map = new HashMap();
+                Map<String, String> map = new HashMap<String, String>();
 
                 if ( StringUtils.isNotEmpty( changeFile.getName() ) )
                 {

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/ThreadedDistributedBuildTaskQueueExecutor.java Wed Apr 15 20:59:07 2009
@@ -49,7 +49,7 @@
 
     private static final int CANCEL_TASK = 2;
 
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( ThreadedDistributedBuildTaskQueueExecutor.class );
 
     /**
      * @requirement

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/deferred/DistributedBuildProjectTaskExecutorDeferred.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/deferred/DistributedBuildProjectTaskExecutorDeferred.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/deferred/DistributedBuildProjectTaskExecutorDeferred.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/deferred/DistributedBuildProjectTaskExecutorDeferred.java Wed Apr 15 20:59:07 2009
@@ -10,7 +10,7 @@
 public class DistributedBuildProjectTaskExecutorDeferred
     implements TaskExecutor
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DistributedBuildProjectTaskExecutorDeferred.class );
 
     /**
      * @plexus.requirement

Modified: continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/overall/DistributedBuildProjectTaskExecutorOverall.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/overall/DistributedBuildProjectTaskExecutorOverall.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/overall/DistributedBuildProjectTaskExecutorOverall.java (original)
+++ continuum/trunk/continuum-builder/src/main/java/org/apache/continuum/builder/distributed/executor/overall/DistributedBuildProjectTaskExecutorOverall.java Wed Apr 15 20:59:07 2009
@@ -19,11 +19,6 @@
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.model.system.Profile;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-import org.codehaus.plexus.PlexusConstants;
-import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.context.Context;
-import org.codehaus.plexus.context.ContextException;
-import org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable;
 import org.codehaus.plexus.taskqueue.Task;
 import org.codehaus.plexus.taskqueue.TaskQueue;
 import org.codehaus.plexus.taskqueue.execution.TaskExecutionException;
@@ -34,9 +29,9 @@
 import org.slf4j.LoggerFactory;
 
 public class DistributedBuildProjectTaskExecutorOverall
-    implements TaskExecutor, Contextualizable
+    implements TaskExecutor
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DistributedBuildProjectTaskExecutorOverall.class );
 
     /**
      * @plexus.requirement
@@ -63,8 +58,6 @@
      */
     private TaskQueue deferredTaskQueue;
 
-    PlexusContainer container;
-
     public void executeTask( Task task )
         throws TaskExecutionException
     {
@@ -74,7 +67,7 @@
 
             Map<String, DistributedBuildTaskQueueExecutor> executors = buildManager.getTaskQueueExecutors();
 
-            DistributedBuildTaskQueueExecutor executor =  filterExecutors( agentGroup, executors );
+            DistributedBuildTaskQueueExecutor executor = filterExecutors( agentGroup, executors );
             if ( executor != null )
             {
                 log.info( "delegating task to build agent task queue executor: " + executor.getBuildAgentUrl() );
@@ -99,7 +92,8 @@
         }
     }
 
-    private DistributedBuildTaskQueueExecutor filterExecutors( Map<String, DistributedBuildTaskQueueExecutor> executors )
+    private DistributedBuildTaskQueueExecutor filterExecutors(
+        Map<String, DistributedBuildTaskQueueExecutor> executors )
     {
         // return the first non-busy taskqueue executor
         for ( String url : executors.keySet() )
@@ -112,10 +106,7 @@
         // else return the first executor
         if ( !executors.isEmpty() )
         {
-            for ( String url : executors.keySet() )
-            {
-                return executors.get( url );
-            }
+            return executors.values().iterator().next();
         }
         return null;
     }
@@ -200,13 +191,4 @@
 
         return null;
     }
-
-    // --------------------------------
-    // Plexus Lifecycle
-    // --------------------------------
-    public void contextualize( Context context )
-        throws ContextException
-    {
-        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
-    }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/builder/distributed/manager/DefaultDistributedBuildManager.java Wed Apr 15 20:59:07 2009
@@ -63,7 +63,6 @@
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
 import org.apache.maven.continuum.store.ContinuumStoreException;
-
 import org.codehaus.plexus.PlexusConstants;
 import org.codehaus.plexus.PlexusContainer;
 import org.codehaus.plexus.component.repository.exception.ComponentLifecycleException;
@@ -85,7 +84,7 @@
 public class DefaultDistributedBuildManager
     implements DistributedBuildManager, Contextualizable, Initializable
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DefaultDistributedBuildManager.class );
 
     /**
      * @plexus.requirement
@@ -497,7 +496,7 @@
         {
             SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
 
-            List<Map> installationsList = client.getAvailableInstallations();
+            List<Map<String, String>> installationsList = client.getAvailableInstallations();
 
             for ( Map context : installationsList )
             {

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/buildmanager/ParallelBuildsManager.java Wed Apr 15 20:59:07 2009
@@ -31,8 +31,8 @@
 import org.apache.continuum.buildqueue.BuildQueueService;
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
 import org.apache.continuum.dao.BuildDefinitionDao;
-import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.continuum.taskqueue.OverallBuildQueue;
 import org.apache.continuum.taskqueue.PrepareBuildProjectsTask;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
@@ -67,7 +67,7 @@
 public class ParallelBuildsManager
     implements BuildsManager, Contextualizable
 {
-    private Logger log = LoggerFactory.getLogger( ParallelBuildsManager.class );
+    private static final Logger log = LoggerFactory.getLogger( ParallelBuildsManager.class );
 
     // map must be synchronized!
     private Map<Integer, OverallBuildQueue> overallBuildQueues =
@@ -112,7 +112,7 @@
         }
 
         OverallBuildQueue overallBuildQueue =
-            getOverallBuildQueue( projectId, BUILD_QUEUE, buildDefinition.getSchedule().getBuildQueues() );
+            getOverallBuildQueue( BUILD_QUEUE, buildDefinition.getSchedule().getBuildQueues() );
 
         String buildDefinitionLabel = buildDefinition.getDescription();
         if ( StringUtils.isEmpty( buildDefinitionLabel ) )
@@ -157,7 +157,6 @@
             catch ( TaskQueueException e )
             {
                 log.warn( "Error occurred while verifying if project is already queued." );
-                continue;
             }
         }
 
@@ -165,7 +164,7 @@
         {
             BuildDefinition buildDef = projectsBuildDefinitionsMap.get( firstProjectId );
             OverallBuildQueue overallBuildQueue =
-                getOverallBuildQueue( firstProjectId, BUILD_QUEUE, buildDef.getSchedule().getBuildQueues() );
+                getOverallBuildQueue( BUILD_QUEUE, buildDef.getSchedule().getBuildQueues() );
 
             if ( overallBuildQueue != null )
             {
@@ -230,7 +229,7 @@
     {
         synchronized ( overallBuildQueues )
         {
-            OverallBuildQueue overallBuildQueue = null;
+            OverallBuildQueue overallBuildQueue;
             overallBuildQueue = overallBuildQueues.get( buildQueueId );
             if ( overallBuildQueue != null )
             {
@@ -274,7 +273,7 @@
         synchronized ( overallBuildQueues )
         {
             Set<Integer> keySet = overallBuildQueues.keySet();
-            OverallBuildQueue overallBuildQueue = null;
+            OverallBuildQueue overallBuildQueue;
             for ( Integer key : keySet )
             {
                 overallBuildQueue = overallBuildQueues.get( key );
@@ -389,7 +388,7 @@
         }
 
         OverallBuildQueue overallBuildQueue =
-            getOverallBuildQueue( projectId, CHECKOUT_QUEUE, defaultBuildDefinition.getSchedule().getBuildQueues() );
+            getOverallBuildQueue( CHECKOUT_QUEUE, defaultBuildDefinition.getSchedule().getBuildQueues() );
         CheckOutTask checkoutTask =
             new CheckOutTask( projectId, workingDirectory, projectName, scmUsername, scmPassword );
         try
@@ -496,7 +495,7 @@
             {
                 if ( task != null )
                 {
-                    Map<Integer, Integer> map = ( (PrepareBuildProjectsTask) task ).getProjectsBuildDefinitionsMap();
+                    Map<Integer, Integer> map = task.getProjectsBuildDefinitionsMap();
 
                     if ( map.size() > 0 )
                     {
@@ -658,13 +657,11 @@
                 else
                 {
                     log.error( "Project '" + projectId + "' not found in any of the build queues." );
-                    continue;
                 }
             }
             catch ( TaskQueueException e )
             {
                 log.error( "Error occurred while removing project '" + projectId + "' from build queue." );
-                continue;
             }
         }
     }
@@ -687,13 +684,11 @@
                 else
                 {
                     log.error( "Project '" + projectId + "' not found in any of the checkout queues." );
-                    continue;
                 }
             }
             catch ( TaskQueueException e )
             {
                 log.error( "Error occurred while removing project '" + projectId + "' from checkout queue." );
-                continue;
             }
         }
     }
@@ -806,8 +801,8 @@
     public void removeOverallBuildQueue( int overallBuildQueueId )
         throws BuildManagerException
     {
-        List<Task> tasks = null;
-        List<CheckOutTask> checkoutTasks = null;
+        List<Task> tasks;
+        List<CheckOutTask> checkoutTasks;
 
         synchronized ( overallBuildQueues )
         {
@@ -870,7 +865,6 @@
             catch ( ContinuumStoreException e )
             {
                 log.error( "Unable to queue build task for project '" + buildTask.getProjectName() + "'" );
-                continue;
             }
         }
 
@@ -885,7 +879,6 @@
             catch ( ContinuumStoreException e )
             {
                 log.error( "Unable to queue checkout task for project '" + task.getProjectName() + "'" );
-                continue;
             }
         }
     }
@@ -1115,7 +1108,7 @@
     }
 
     // get overall queue where project will be queued
-    private OverallBuildQueue getOverallBuildQueue( int projectId, int typeOfQueue, List<BuildQueue> buildQueues )
+    private OverallBuildQueue getOverallBuildQueue( int typeOfQueue, List<BuildQueue> buildQueues )
         throws BuildManagerException
     {
         OverallBuildQueue whereToBeQueued = null;
@@ -1238,7 +1231,7 @@
         this.container = container;
     }
 
-    private OverallBuildQueue createOverallBuildQueue( BuildQueue defaultBuildQueue )
+    private void createOverallBuildQueue( BuildQueue defaultBuildQueue )
         throws ComponentLookupException
     {
         OverallBuildQueue overallBuildQueue = (OverallBuildQueue) container.lookup( OverallBuildQueue.class );
@@ -1246,8 +1239,6 @@
         overallBuildQueue.setName( defaultBuildQueue.getName() );
 
         overallBuildQueues.put( overallBuildQueue.getId(), overallBuildQueue );
-
-        return overallBuildQueue;
     }
 
     public TaskQueue getPrepareBuildQueue()

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java Wed Apr 15 20:59:07 2009
@@ -20,6 +20,7 @@
  */
 
 import java.util.ArrayList;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
@@ -235,12 +236,12 @@
 
     public static boolean getBoolean( Map context, String key )
     {
-        return ( (Boolean) getObject( context, key ) ).booleanValue();
+        return (Boolean) getObject( context, key );
     }
-    
+
     public static boolean getBoolean( Map context, String key, boolean defaultValue )
     {
-        return ( (Boolean) getObject( context, key, Boolean.valueOf( defaultValue ) ) ).booleanValue();
+        return (Boolean) getObject( context, key, defaultValue );
     }
 
     public static List getList( Map context, String key, Object defaultValue )
@@ -253,27 +254,17 @@
         }
         else
         {
-            List list = new ArrayList();
+            List<Object> list = new ArrayList<Object>();
 
             if ( obj instanceof Object[] )
             {
                 Object[] objA = (Object[]) obj;
-    
-                for ( Object o : objA )
-                {
-                    if ( o instanceof Map )
-                    {
-                        list.add( (Map) o );
-                    }
-                    else
-                    {
-                        list.add( o );
-                    }
-                }
+
+                list.addAll( Arrays.asList( objA ) );
             }
             else
             {
-                list = (List) obj;
+                list = (List<Object>) obj;
             }
 
             return list;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/release/distributed/manager/DefaultDistributedReleaseManager.java Wed Apr 15 20:59:07 2009
@@ -59,7 +59,7 @@
 public class DefaultDistributedReleaseManager
     implements DistributedReleaseManager
 {
-    private Logger log = LoggerFactory.getLogger( this.getClass() );
+    private static final Logger log = LoggerFactory.getLogger( DefaultDistributedReleaseManager.class );
 
     public final String PREPARED_RELEASES_FILENAME = "prepared-releases.xml";
 
@@ -78,7 +78,7 @@
      */
     ConfigurationService configurationService;
 
-    private Map<String, Map> releasesInProgress;
+    private Map<String, Map<String, Object>> releasesInProgress;
 
     public Map getReleasePluginParameters( int projectId, String pomFilename )
         throws ContinuumReleaseException, BuildAgentConfigurationException
@@ -99,8 +99,8 @@
         }
         catch ( MalformedURLException e )
         {
-           log.error( "Invalid build agent url " + buildAgentUrl ); 
-           throw new ContinuumReleaseException( "Invalid build agent url " + buildAgentUrl );
+            log.error( "Invalid build agent url " + buildAgentUrl );
+            throw new ContinuumReleaseException( "Invalid build agent url " + buildAgentUrl );
         }
         catch ( Exception e )
         {
@@ -138,7 +138,7 @@
         }
     }
 
-    public String releasePrepare( Project project, Properties releaseProperties, Map<String, String> releaseVersion, 
+    public String releasePrepare( Project project, Properties releaseProperties, Map<String, String> releaseVersion,
                                   Map<String, String> developmentVersion, Map<String, String> environments )
         throws ContinuumReleaseException, BuildAgentConfigurationException
     {
@@ -154,8 +154,9 @@
         try
         {
             SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
-            String releaseId = client.releasePrepare( createProjectMap( project ), createPropertiesMap( releaseProperties ),
-                                                      releaseVersion, developmentVersion, environments );
+            String releaseId =
+                client.releasePrepare( createProjectMap( project ), createPropertiesMap( releaseProperties ),
+                                       releaseVersion, developmentVersion, environments );
 
             addReleasePrepare( releaseId, buildAgentUrl, releaseVersion.get( releaseId ) );
 
@@ -292,8 +293,8 @@
         }
     }
 
-    public void releasePerform( int projectId, String releaseId, String goals, String arguments, boolean useReleaseProfile, 
-                                LocalRepository repository )
+    public void releasePerform( int projectId, String releaseId, String goals, String arguments,
+                                boolean useReleaseProfile, LocalRepository repository )
         throws ContinuumReleaseException, BuildAgentConfigurationException
     {
         String buildAgentUrl = getBuildAgentUrl( releaseId );
@@ -313,7 +314,7 @@
             arguments = "";
         }
 
-        Map map = new HashMap();
+        Map<String, String> map = new HashMap<String, String>();
 
         if ( repository != null )
         {
@@ -321,7 +322,7 @@
             map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_NAME, repository.getName() );
             map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY_LAYOUT, repository.getLayout() );
         }
-        
+
         try
         {
             SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
@@ -341,8 +342,9 @@
         }
     }
 
-    public void releasePerformFromScm( int projectId, String goals, String arguments, boolean useReleaseProfile, LocalRepository repository, 
-                                       String scmUrl, String scmUsername, String scmPassword, String scmTag, String scmTagBase, Map environments )
+    public void releasePerformFromScm( int projectId, String goals, String arguments, boolean useReleaseProfile,
+                                       LocalRepository repository, String scmUrl, String scmUsername,
+                                       String scmPassword, String scmTag, String scmTagBase, Map environments )
         throws ContinuumReleaseException, BuildAgentConfigurationException
     {
         BuildResult buildResult = buildResultDao.getLatestBuildResultForProject( projectId );
@@ -364,7 +366,7 @@
             arguments = "";
         }
 
-        Map map = new HashMap();
+        Map<String, String> map = new HashMap<String, String>();
 
         if ( repository != null )
         {
@@ -376,8 +378,9 @@
         try
         {
             SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
-            String releaseId = client.releasePerformFromScm( goals, arguments, useReleaseProfile, map, scmUrl, scmUsername, scmPassword,
-                                                             scmTag, scmTagBase, environments );
+            String releaseId =
+                client.releasePerformFromScm( goals, arguments, useReleaseProfile, map, scmUrl, scmUsername,
+                                              scmPassword, scmTag, scmTagBase, environments );
 
             addReleaseInProgress( releaseId, "perform", projectId );
         }
@@ -454,8 +457,8 @@
         throws ContinuumReleaseException, BuildAgentConfigurationException
     {
         List<Map> releases = new ArrayList<Map>();
-        Map<String, Map> releasesMap = new HashMap<String, Map>();
-        
+        Map<String, Map<String, Object>> releasesMap = new HashMap<String, Map<String, Object>>();
+
         if ( releasesInProgress != null && !releasesInProgress.isEmpty() )
         {
             for ( String releaseId : releasesInProgress.keySet() )
@@ -471,12 +474,13 @@
 
                     try
                     {
-                        SlaveBuildAgentTransportClient client = new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
+                        SlaveBuildAgentTransportClient client =
+                            new SlaveBuildAgentTransportClient( new URL( buildAgentUrl ) );
                         Map map = client.getListener( releaseId );
 
                         if ( map != null && !map.isEmpty() )
                         {
-                            Map release = releasesInProgress.get( releaseId );
+                            Map<String, Object> release = releasesInProgress.get( releaseId );
                             release.put( DistributedReleaseUtil.KEY_RELEASE_ID, releaseId );
                             release.put( DistributedReleaseUtil.KEY_BUILD_AGENT_URL, buildAgentUrl );
 
@@ -506,15 +510,16 @@
 
     private Map createProjectMap( Project project )
     {
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
 
-        map.put( DistributedReleaseUtil.KEY_PROJECT_ID, new Integer( project.getId() ) );
+        map.put( DistributedReleaseUtil.KEY_PROJECT_ID, project.getId() );
         map.put( DistributedReleaseUtil.KEY_GROUP_ID, project.getGroupId() );
         map.put( DistributedReleaseUtil.KEY_ARTIFACT_ID, project.getArtifactId() );
         map.put( DistributedReleaseUtil.KEY_SCM_URL, project.getScmUrl() );
         if ( project.getProjectGroup().getLocalRepository() != null )
         {
-            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY, project.getProjectGroup().getLocalRepository().getLocation() );
+            map.put( DistributedReleaseUtil.KEY_LOCAL_REPOSITORY,
+                     project.getProjectGroup().getLocalRepository().getLocation() );
         }
 
         return map;
@@ -522,7 +527,7 @@
 
     private Map createPropertiesMap( Properties properties )
     {
-        Map map = new HashMap();
+        Map<String, String> map = new HashMap<String, String>();
 
         String prop = properties.getProperty( "username" );
         if ( prop != null )
@@ -598,7 +603,7 @@
             {
                 ContinuumPrepareReleasesModelXpp3Reader reader = new ContinuumPrepareReleasesModelXpp3Reader();
                 PreparedReleaseModel model = reader.read( new InputStreamReader( new FileInputStream( file ) ) );
-    
+
                 return model.getPreparedReleases();
             }
             catch ( IOException e )
@@ -637,20 +642,20 @@
         {
             preparedReleases = new ArrayList<PreparedRelease>();
         }
-        else 
+        else
         {
             boolean found = false;
 
             for ( PreparedRelease preparedRelease : preparedReleases )
             {
-                if ( preparedRelease.getReleaseId().equals( release.getReleaseId() ) && 
-                     preparedRelease.getReleaseName().equals( release.getReleaseName() ) )
+                if ( preparedRelease.getReleaseId().equals( release.getReleaseId() ) &&
+                    preparedRelease.getReleaseName().equals( release.getReleaseName() ) )
                 {
                     preparedRelease.setBuildAgentUrl( release.getBuildAgentUrl() );
                     found = true;
                 }
             }
-            
+
             if ( !found )
             {
                 preparedReleases.add( release );
@@ -676,10 +681,10 @@
     {
         if ( releasesInProgress == null )
         {
-            releasesInProgress = new HashMap<String, Map>();
+            releasesInProgress = new HashMap<String, Map<String, Object>>();
         }
 
-        Map map = new HashMap();
+        Map<String, Object> map = new HashMap<String, Object>();
         map.put( DistributedReleaseUtil.KEY_RELEASE_GOAL, releaseType );
         map.put( DistributedReleaseUtil.KEY_PROJECT_ID, projectId );
 
@@ -715,8 +720,8 @@
 
     private File getPreparedReleasesFile()
     {
-        return new File( System.getProperty( "appserver.base" ) + File.separator + "conf" + File.separator
-                         + PREPARED_RELEASES_FILENAME );
+        return new File( System.getProperty( "appserver.base" ) + File.separator + "conf" + File.separator +
+            PREPARED_RELEASES_FILENAME );
     }
 
     private boolean checkBuildAgent( String buildAgentUrl )

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/repository/DefaultRepositoryService.java Wed Apr 15 20:59:07 2009
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import java.util.List;
+
 import org.apache.continuum.dao.LocalRepositoryDao;
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.continuum.dao.RepositoryPurgeConfigurationDao;
@@ -32,8 +34,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.List;
-
 /**
  * DefaultRepositoryService
  *
@@ -45,7 +45,7 @@
 public class DefaultRepositoryService
     implements RepositoryService
 {
-    private Logger log = LoggerFactory.getLogger( DefaultRepositoryService.class );
+    private static final Logger log = LoggerFactory.getLogger( DefaultRepositoryService.class );
 
     /**
      * @plexus.requirement
@@ -81,7 +81,7 @@
                 {
                     throw new RepositoryServiceException( "Local repository name must be unique" );
                 }
-                
+
                 if ( repo.getLocation().equals( localRepository.getLocation() ) )
                 {
                     throw new RepositoryServiceException( "Local repository location must be unique" );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/DefaultOverallBuildQueue.java Wed Apr 15 20:59:07 2009
@@ -27,8 +27,6 @@
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.taskqueueexecutor.ParallelBuildsThreadedTaskQueueExecutor;
-import org.apache.continuum.taskqueue.BuildProjectTask;
-import org.apache.continuum.taskqueue.CheckOutTask;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.codehaus.plexus.taskqueue.Task;
@@ -48,6 +46,8 @@
 public class DefaultOverallBuildQueue
     implements OverallBuildQueue
 {
+    private static final Logger log = LoggerFactory.getLogger( DefaultOverallBuildQueue.class );
+
     @Resource
     private BuildDefinitionDao buildDefinitionDao;
 
@@ -59,8 +59,6 @@
 
     private String name;
 
-    private Logger log = LoggerFactory.getLogger( DefaultOverallBuildQueue.class );
-
     public int getId()
     {
         return id;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueue/manager/DefaultTaskQueueManager.java Wed Apr 15 20:59:07 2009
@@ -58,7 +58,7 @@
 public class DefaultTaskQueueManager
     implements TaskQueueManager, Contextualizable
 {
-    private Logger log = LoggerFactory.getLogger( DefaultTaskQueueManager.class );
+    private static final Logger log = LoggerFactory.getLogger( DefaultTaskQueueManager.class );
 
     /**
      * @plexus.requirement role-hint="distributed-build-project"

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/continuum/taskqueueexecutor/ParallelBuildsThreadedTaskQueueExecutor.java Wed Apr 15 20:59:07 2009
@@ -47,24 +47,24 @@
 public class ParallelBuildsThreadedTaskQueueExecutor
     implements TaskQueueExecutor, Initializable, Startable
 {
+    private static final Logger log = LoggerFactory.getLogger( ParallelBuildsThreadedTaskQueueExecutor.class );
+
     private static final int SHUTDOWN = 1;
 
     private static final int CANCEL_TASK = 2;
 
-    private Logger log = LoggerFactory.getLogger( getClass() );
-
     /**
-     * @requirement 
+     * @requirement
      */
     private TaskQueue queue;
 
     /**
-     * @requirement 
+     * @requirement
      */
     private TaskExecutor executor;
 
     /**
-     * @configuration 
+     * @configuration
      */
     private String name;
 
@@ -220,8 +220,9 @@
                 }
                 else
                 {
-                    log.warn( "Task not cancelled (Flags: done: " + future.isDone() + " cancelled: " +
-                        future.isCancelled() + ")" );
+                    log.warn(
+                        "Task not cancelled (Flags: done: " + future.isDone() + " cancelled: " + future.isCancelled() +
+                            ")" );
                 }
             }
             else

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/build/settings/DefaultSchedulesActivator.java Wed Apr 15 20:59:07 2009
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+import java.text.ParseException;
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.DirectoryPurgeConfigurationDao;
 import org.apache.continuum.dao.RepositoryPurgeConfigurationDao;
@@ -42,11 +47,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.text.ParseException;
-import java.util.Collection;
-import java.util.Date;
-import java.util.List;
-
 /**
  * @author <a href="mailto:jason@maven.org">Jason van Zyl</a>
  * @version $Id$
@@ -55,7 +55,7 @@
 public class DefaultSchedulesActivator
     implements SchedulesActivator
 {
-    private Logger log = LoggerFactory.getLogger( DefaultSchedulesActivator.class );
+    private static final Logger log = LoggerFactory.getLogger( DefaultSchedulesActivator.class );
 
     /**
      * @plexus.requirement
@@ -83,7 +83,7 @@
     private Scheduler scheduler;
 
     //private int delay = 3600;
-    private int delay = 1;
+    private static final int delay = 1;
 
     public void activateSchedules( Continuum continuum )
         throws SchedulesActivationException
@@ -156,7 +156,7 @@
     {
         log.info( "Deactivating schedule " + schedule.getName() );
 
-        unschedule( schedule, continuum );
+        unschedule( schedule );
     }
 
     protected void schedule( Schedule schedule, Continuum continuum, Class jobClass )
@@ -218,7 +218,7 @@
         }
     }
 
-    protected void unschedule( Schedule schedule, Continuum continuum )
+    private void unschedule( Schedule schedule )
         throws SchedulesActivationException
     {
         try
@@ -242,12 +242,8 @@
     {
         List<BuildDefinition> buildDef = buildDefinitionDao.getBuildDefinitionsBySchedule( schedule.getId() );
 
-        if ( buildDef.size() > 0 )
-        {
-            return true;
-        }
+        return buildDef.size() > 0;
 
-        return false;
     }
 
     private boolean isScheduleFromPurgeJob( Schedule schedule )
@@ -257,11 +253,7 @@
         List<DirectoryPurgeConfiguration> dirPurgeConfigs =
             directoryPurgeConfigurationDao.getDirectoryPurgeConfigurationsBySchedule( schedule.getId() );
 
-        if ( repoPurgeConfigs.size() > 0 || dirPurgeConfigs.size() > 0 )
-        {
-            return true;
-        }
+        return repoPurgeConfigs.size() > 0 || dirPurgeConfigs.size() > 0;
 
-        return false;
     }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java Wed Apr 15 20:59:07 2009
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.BuildResultDao;
 import org.apache.continuum.dao.ProjectDao;
@@ -50,11 +55,6 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -63,7 +63,7 @@
 public class DefaultBuildController
     implements BuildController
 {
-    private Logger log = LoggerFactory.getLogger( DefaultBuildController.class );
+    private static final Logger log = LoggerFactory.getLogger( DefaultBuildController.class );
 
     /**
      * @plexus.requirement
@@ -79,12 +79,12 @@
      * @plexus.requirement
      */
     private ProjectDao projectDao;
-    
+
     /**
      * @plexus.requirement
      */
     private ProjectGroupDao projectGroupDao;
-    
+
     /**
      * @plexus.requirement
      */
@@ -132,7 +132,7 @@
             log.info( "Error updating from SCM, not building" );
             return;
         }
-        
+
         log.info( "Starting build of " + context.getProject().getName() );
         startBuild( context );
 
@@ -165,7 +165,7 @@
 
             context.setCancelled( (Boolean) actionContext.get( AbstractContinuumAction.KEY_CANCELLED ) );
 
-            String s = (String) actionContext.get( AbstractContinuumAction.KEY_BUILD_ID );
+            String s = AbstractContinuumAction.getBuildId( actionContext );
 
             if ( s != null && !context.isCancelled() )
             {
@@ -213,7 +213,7 @@
             {
                 try
                 {
-                    String s = (String) context.getActionContext().get( AbstractContinuumAction.KEY_BUILD_ID );
+                    String s = AbstractContinuumAction.getBuildId( context.getActionContext() );
 
                     if ( s != null )
                     {
@@ -328,7 +328,8 @@
      * @return
      * @throws TaskExecutionException
      */
-    protected BuildContext initializeBuildContext( int projectId, int buildDefinitionId, int trigger, ScmResult scmResult )
+    protected BuildContext initializeBuildContext( int projectId, int buildDefinitionId, int trigger,
+                                                   ScmResult scmResult )
         throws TaskExecutionException
     {
         BuildContext context = new BuildContext();
@@ -352,7 +353,7 @@
 
             context.setOldBuildResult( oldBuildResult );
 
-		    context.setScmResult( scmResult );
+            context.setScmResult( scmResult );
 
             // CONTINUUM-1871 olamy if continuum is killed during building oldBuildResult will have a endTime 0
             // this means all changes since the project has been loaded in continuum will be in memory
@@ -635,7 +636,8 @@
                 if ( dependencyProject != null )
                 {
                     List buildResults = buildResultDao.getBuildResultsInSuccessForProject( dependencyProject.getId(),
-                                                                                           context.getOldBuildResult().getEndTime() );
+                                                                                           context.getOldBuildResult().getEndTime() )
+                        ;
                     if ( buildResults != null && !buildResults.isEmpty() )
                     {
                         log.debug( "Dependency changed: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
@@ -644,14 +646,14 @@
                     }
                     else
                     {
-                        log.debug( "Dependency not changed: " + dep.getGroupId() + ":" + dep.getArtifactId() +
-                            ":" + dep.getVersion() );
+                        log.debug( "Dependency not changed: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
+                            dep.getVersion() );
                     }
                 }
                 else
                 {
-                    log.debug( "Skip non Continuum project: " + dep.getGroupId() + ":" + dep.getArtifactId() +
-                        ":" + dep.getVersion() );
+                    log.debug( "Skip non Continuum project: " + dep.getGroupId() + ":" + dep.getArtifactId() + ":" +
+                        dep.getVersion() );
                 }
             }
 

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/builddefinition/DefaultBuildDefinitionService.java Wed Apr 15 20:59:07 2009
@@ -19,7 +19,6 @@
 package org.apache.maven.continuum.builddefinition;
 
 import java.util.ArrayList;
-import java.util.Iterator;
 import java.util.List;
 
 import org.apache.continuum.buildqueue.BuildQueueServiceException;
@@ -53,7 +52,7 @@
 public class DefaultBuildDefinitionService
     implements BuildDefinitionService, Initializable
 {
-    private Logger log = LoggerFactory.getLogger( DefaultBuildDefinitionService.class );
+    private static final Logger log = LoggerFactory.getLogger( DefaultBuildDefinitionService.class );
 
     /**
      * @plexus.configuration default-value=""
@@ -577,9 +576,8 @@
             }
             project = projectDao.getProjectWithBuildDetails( project.getId() );
 
-            for ( Iterator<BuildDefinition> iterator = template.getBuildDefinitions().iterator(); iterator.hasNext(); )
+            for ( BuildDefinition bd : (List<BuildDefinition>) template.getBuildDefinitions() )
             {
-                BuildDefinition bd = iterator.next();
                 bd = cloneBuildDefinition( bd );
                 bd.setTemplate( false );
                 bd = buildDefinitionDao.addBuildDefinition( bd );
@@ -606,9 +604,8 @@
                 return null;
             }
 
-            for ( Iterator<BuildDefinition> iterator = template.getBuildDefinitions().iterator(); iterator.hasNext(); )
+            for ( BuildDefinition bd : (List<BuildDefinition>) template.getBuildDefinitions() )
             {
-                BuildDefinition bd = iterator.next();
                 bd.setTemplate( false );
                 bd = buildDefinitionDao.addBuildDefinition( cloneBuildDefinition( bd ) );
                 projectGroup.addBuildDefinition( bd );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildqueue/evaluator/BuildProjectTaskViabilityEvaluator.java Wed Apr 15 20:59:07 2009
@@ -19,17 +19,16 @@
  * under the License.
  */
 
-import org.apache.continuum.taskqueue.BuildProjectTask;
-import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
-
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
-import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.continuum.taskqueue.BuildProjectTask;
+import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.codehaus.plexus.taskqueue.TaskViabilityEvaluator;
+
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -71,9 +70,9 @@
 
         for ( BuildProjectTask task : (Collection<BuildProjectTask>) tasks )
         {
-            Integer key = new Integer( task.getProjectId() );
+            int key = task.getProjectId();
 
-            List<BuildProjectTask> projectTasks = (List<BuildProjectTask>) projects.get( key );
+            List<BuildProjectTask> projectTasks = projects.get( key );
 
             if ( projectTasks == null )
             {
@@ -87,9 +86,9 @@
 
         List<BuildProjectTask> toBeRemoved = new ArrayList<BuildProjectTask>();
 
-        for ( Iterator it = projects.values().iterator(); it.hasNext(); )
+        for ( List<BuildProjectTask> projectTasks : projects.values() )
         {
-            toBeRemoved.addAll( checkTasks( (List) it.next() ) );
+            toBeRemoved.addAll( checkTasks( projectTasks ) );
         }
 
         return toBeRemoved;

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractBuildDefinitionContinuumAction.java Wed Apr 15 20:59:07 2009
@@ -19,6 +19,8 @@
  * under the License.
  */
 
+import java.util.List;
+
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.ScheduleDao;
 import org.apache.maven.continuum.ContinuumException;
@@ -30,8 +32,6 @@
 import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 
-import java.util.List;
-
 /**
  * AbstractBuildDefinitionContinuumAction:
  *
@@ -148,8 +148,8 @@
      * @param buildDefinition
      * @throws ContinuumException
      */
-    protected BuildDefinition updateBuildDefinitionInList( List<BuildDefinition> buildDefinitions,
-                                                           BuildDefinition buildDefinition )
+    protected void updateBuildDefinitionInList( List<BuildDefinition> buildDefinitions,
+                                                BuildDefinition buildDefinition )
         throws ContinuumException
     {
         try
@@ -202,8 +202,6 @@
                 storedDefinition.setAlwaysBuild( buildDefinition.isAlwaysBuild() );
 
                 buildDefinitionDao.storeBuildDefinition( storedDefinition );
-
-                return storedDefinition;
             }
             else
             {

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java Wed Apr 15 20:59:07 2009
@@ -30,7 +30,6 @@
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.action.AbstractAction;
-import org.codehaus.plexus.util.StringUtils;
 
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
@@ -100,20 +99,6 @@
     public static final String KEY_SCM_RESULT_MAP = "scm-result-map";
 
     // ----------------------------------------------------------------------
-    // Utils
-    // ----------------------------------------------------------------------
-
-    protected String nullIfEmpty( String string )
-    {
-        if ( StringUtils.isEmpty( string ) )
-        {
-            return null;
-        }
-
-        return string;
-    }
-
-    // ----------------------------------------------------------------------
     //
     // ----------------------------------------------------------------------
 
@@ -179,7 +164,7 @@
 
     public static ScmResult getUpdateScmResult( Map context )
     {
-        return (ScmResult) getObject( context, KEY_UPDATE_SCM_RESULT );
+        return getUpdateScmResult( context, null );
     }
 
     public static ScmResult getUpdateScmResult( Map context, ScmResult defaultValue )
@@ -199,7 +184,7 @@
 
     public static ScmResult getScmResult( Map context )
     {
-        return (ScmResult) getObject( context, KEY_SCM_RESULT );
+        return getScmResult( context, null );
     }
 
     public static ScmResult getScmResult( Map context, ScmResult defaultValue )
@@ -209,7 +194,7 @@
 
     public static ScmResult getOldScmResult( Map context )
     {
-        return (ScmResult) getObject( context, KEY_OLD_SCM_RESULT );
+        return getOldScmResult( context, null );
     }
 
     public static ScmResult getOldScmResult( Map context, ScmResult defaultValue )
@@ -263,7 +248,7 @@
 
     public static boolean getBoolean( Map context, String key, boolean defaultValue )
     {
-        return (Boolean) getObject( context, key, Boolean.valueOf( defaultValue ) );
+        return (Boolean) getObject( context, key, defaultValue );
     }
 
     protected static int getInteger( Map context, String key )

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectAction.java Wed Apr 15 20:59:07 2009
@@ -15,14 +15,14 @@
  * the License.
  */
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.Project;
 
-import java.util.Iterator;
-import java.util.Map;
-
 /**
  * AddBuildDefinitionToProjectAction:
  *
@@ -49,10 +49,8 @@
 
         if ( buildDefinitionTemplate != null )
         {
-            for ( Iterator<BuildDefinition> iterator = buildDefinitionTemplate.getBuildDefinitions().iterator();
-                  iterator.hasNext(); )
+            for ( BuildDefinition buildDefinition : (List<BuildDefinition>) buildDefinitionTemplate.getBuildDefinitions() )
             {
-                BuildDefinition buildDefinition = iterator.next();
                 resolveDefaultBuildDefinitionsForProject( buildDefinition, project );
 
                 project.addBuildDefinition( buildDefinition );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AddBuildDefinitionToProjectGroupAction.java Wed Apr 15 20:59:07 2009
@@ -19,14 +19,14 @@
  * under the License.
  */
 
+import java.util.List;
+import java.util.Map;
+
 import org.apache.continuum.dao.ProjectGroupDao;
 import org.apache.maven.continuum.model.project.BuildDefinition;
 import org.apache.maven.continuum.model.project.BuildDefinitionTemplate;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 
-import java.util.Iterator;
-import java.util.Map;
-
 /**
  * AddBuildDefinitionToProjectAction:
  *
@@ -52,10 +52,8 @@
         BuildDefinitionTemplate buildDefinitionTemplate = getBuildDefinitionTemplate( map );
         if ( buildDefinitionTemplate != null )
         {
-            for ( Iterator<BuildDefinition> iterator = buildDefinitionTemplate.getBuildDefinitions().iterator();
-                  iterator.hasNext(); )
+            for ( BuildDefinition buildDefinition : (List<BuildDefinition>) buildDefinitionTemplate.getBuildDefinitions() )
             {
-                BuildDefinition buildDefinition = iterator.next();
                 resolveDefaultBuildDefinitionsForProjectGroup( buildDefinition, projectGroup );
 
                 projectGroup.addBuildDefinition( buildDefinition );

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckWorkingDirectoryAction.java Wed Apr 15 20:59:07 2009
@@ -19,13 +19,13 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.Map;
+
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.maven.continuum.model.project.Project;
 import org.apache.maven.continuum.utils.WorkingDirectoryService;
 
-import java.io.File;
-import java.util.Map;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -61,6 +61,6 @@
 
         File[] files = workingDirectory.listFiles();
 
-        context.put( KEY_WORKING_DIRECTORY_EXISTS, Boolean.valueOf( files.length > 0 ) );
+        context.put( KEY_WORKING_DIRECTORY_EXISTS, files.length > 0 );
     }
 }

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java?rev=765355&r1=765354&r2=765355&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java (original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/core/action/CheckoutProjectContinuumAction.java Wed Apr 15 20:59:07 2009
@@ -19,6 +19,11 @@
  * under the License.
  */
 
+import java.io.File;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
 import org.apache.continuum.dao.BuildDefinitionDao;
 import org.apache.continuum.dao.ProjectDao;
 import org.apache.continuum.scm.ContinuumScm;
@@ -29,7 +34,6 @@
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
-import org.apache.maven.continuum.store.ContinuumObjectNotFoundException;
 import org.apache.maven.continuum.store.ContinuumStoreException;
 import org.apache.maven.scm.ScmException;
 import org.apache.maven.scm.command.checkout.CheckOutScmResult;
@@ -37,11 +41,6 @@
 import org.apache.maven.scm.repository.ScmRepositoryException;
 import org.codehaus.plexus.util.StringUtils;
 
-import java.io.File;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
 /**
  * @author <a href="mailto:trygvis@inamo.no">Trygve Laugst&oslash;l</a>
  * @version $Id$
@@ -71,7 +70,7 @@
     private ProjectDao projectDao;
 
     public void execute( Map context )
-        throws ContinuumObjectNotFoundException, ContinuumStoreException
+        throws ContinuumStoreException
     {
         Project project = projectDao.getProject( getProject( context ).getId() );
 



Mime
View raw message