continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r767796 - in /continuum/branches/continuum-1.3.x: continuum-builder/src/main/java/org/apache/continuum/builder/utils/ continuum-core/src/main/java/org/apache/continuum/release/distributed/ continuum-core/src/main/java/org/apache/maven/conti...
Date Thu, 23 Apr 2009 05:08:20 GMT
Author: evenisse
Date: Thu Apr 23 05:08:19 2009
New Revision: 767796

URL: http://svn.apache.org/viewvc?rev=767796&view=rev
Log:
More java5 code and clean up lot of warnings found by Idea

Modified:
    continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
    continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java
    continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
    continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java

Modified: continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-builder/src/main/java/org/apache/continuum/builder/utils/ContinuumBuildConstant.java
Thu Apr 23 05:08:19 2009
@@ -179,132 +179,132 @@
 
     public static final String KEY_MAX_JOB_EXEC_TIME = "max-job-exec-time";
 
-    public static int getProjectId( Map context )
+    public static int getProjectId( Map<String, Object> context )
     {
         return getInteger( context, KEY_PROJECT_ID );
     }
 
-    public static int getBuildDefinitionId( Map context )
+    public static int getBuildDefinitionId( Map<String, Object> context )
     {
         return getInteger( context, KEY_BUILD_DEFINITION_ID );
     }
 
-    public static String getBuildError( Map context )
+    public static String getBuildError( Map<String, Object> context )
     {
         return getString( context, KEY_BUILD_ERROR );
     }
 
-    public static int getTrigger( Map context )
+    public static int getTrigger( Map<String, Object> context )
     {
         return getInteger( context, KEY_TRIGGER );
     }
 
-    public static long getStartTime( Map context )
+    public static long getStartTime( Map<String, Object> context )
     {
         return new Long( getString( context, KEY_START_TIME ) );
     }
 
-    public static long getEndTime( Map context )
+    public static long getEndTime( Map<String, Object> context )
     {
         return new Long( getString( context, KEY_END_TIME ) );
     }
 
-    public static int getBuildExitCode( Map context )
+    public static int getBuildExitCode( Map<String, Object> context )
     {
         return getInteger( context, KEY_BUILD_EXIT_CODE );
     }
 
-    public static int getBuildState( Map context )
+    public static int getBuildState( Map<String, Object> context )
     {
         return getInteger( context, KEY_BUILD_STATE );
     }
 
-    public static String getScmCommandLine( Map context )
+    public static String getScmCommandLine( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_COMMAND_LINE );
     }
 
-    public static String getScmCommandOutput( Map context )
+    public static String getScmCommandOutput( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_COMMAND_OUTPUT );
     }
 
-    public static String getScmException( Map context )
+    public static String getScmException( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_EXCEPTION );
     }
 
-    public static String getScmProviderMessage( Map context )
+    public static String getScmProviderMessage( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_PROVIDER_MESSAGE );
     }
 
-    public static boolean isScmSuccess( Map context )
+    public static boolean isScmSuccess( Map<String, Object> context )
     {
         return getBoolean( context, KEY_SCM_SUCCESS );
     }
 
-    public static int getProjectGroupId( Map context )
+    public static int getProjectGroupId( Map<String, Object> context )
     {
         return getInteger( context, KEY_PROJECT_GROUP_ID );
     }
 
-    public static String getScmRootAddress( Map context )
+    public static String getScmRootAddress( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_ROOT_ADDRESS );
     }
 
-    public static String getScmError( Map context )
+    public static String getScmError( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_ERROR );
     }
 
-    public static String getBuildOutput( Map context )
+    public static String getBuildOutput( Map<String, Object> context )
     {
         return getString( context, KEY_BUILD_OUTPUT );
     }
 
-    public static BuildResult getBuildResult( Map context, Object defaultValue )
+    public static BuildResult getBuildResult( Map<String, Object> context, Object defaultValue
)
     {
         return (BuildResult) getObject( context, KEY_BUILD_RESULT, defaultValue );
     }
 
-    public static String getInstallationName( Map context )
+    public static String getInstallationName( Map<String, Object> context )
     {
         return getString( context, KEY_INSTALLATION_NAME );
     }
 
-    public static String getInstallationType( Map context )
+    public static String getInstallationType( Map<String, Object> context )
     {
         return getString( context, KEY_INSTALLATION_TYPE );
     }
 
-    public static String getInstallationVarValue( Map context )
+    public static String getInstallationVarValue( Map<String, Object> context )
     {
         return getString( context, KEY_INSTALLATION_VAR_VALUE );
     }
 
-    public static String getInstallationVarName( Map context )
+    public static String getInstallationVarName( Map<String, Object> context )
     {
         return getString( context, KEY_INSTALLATION_VAR_NAME );
     }
 
-    public static List getScmChanges( Map context )
+    public static List getScmChanges( Map<String, Object> context )
     {
         return getList( context, KEY_SCM_CHANGES );
     }
 
-    public static String getChangeSetAuthor( Map context )
+    public static String getChangeSetAuthor( Map<String, Object> context )
     {
         return getString( context, KEY_CHANGESET_AUTHOR );
     }
 
-    public static String getChangeSetComment( Map context )
+    public static String getChangeSetComment( Map<String, Object> context )
     {
         return getString( context, KEY_CHANGESET_COMMENT );
     }
 
-    public static long getChangeSetDate( Map context )
+    public static long getChangeSetDate( Map<String, Object> context )
     {
         Date date = getDate( context, KEY_CHANGESET_DATE );
 
@@ -318,173 +318,173 @@
         }
     }
 
-    public static List getChangeSetFiles( Map context )
+    public static List getChangeSetFiles( Map<String, Object> context )
     {
         return getList( context, KEY_CHANGESET_FILES );
     }
 
-    public static String getChangeFileName( Map context )
+    public static String getChangeFileName( Map<String, Object> context )
     {
         return getString( context, KEY_CHANGEFILE_NAME );
     }
 
-    public static String getChangeFileRevision( Map context )
+    public static String getChangeFileRevision( Map<String, Object> context )
     {
         return getString( context, KEY_CHANGEFILE_REVISION );
     }
 
-    public static String getChangeFileStatus( Map context )
+    public static String getChangeFileStatus( Map<String, Object> context )
     {
         return getString( context, KEY_CHANGEFILE_STATUS );
     }
 
-    public static String getGroupId( Map context )
+    public static String getGroupId( Map<String, Object> context )
     {
         return getString( context, KEY_GROUP_ID );
     }
 
-    public static String getArtifactId( Map context )
+    public static String getArtifactId( Map<String, Object> context )
     {
         return getString( context, KEY_ARTIFACT_ID );
     }
 
-    public static String getVersion( Map context )
+    public static String getVersion( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_VERSION );
 
     }
 
-    public static String getProjectName( Map context )
+    public static String getProjectName( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_NAME );
     }
 
-    public static String getProjectDescription( Map context )
+    public static String getProjectDescription( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_DESCRIPTION );
     }
 
-    public static String getProjectUrl( Map context )
+    public static String getProjectUrl( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_URL );
     }
 
-    public static String getScmUrl( Map context )
+    public static String getScmUrl( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_URL );
     }
 
-    public static String getScmTag( Map context )
+    public static String getScmTag( Map<String, Object> context )
     {
         return getString( context, KEY_SCM_TAG );
     }
 
-    public static Map getProjectParent( Map context )
+    public static Map getProjectParent( Map<String, Object> context )
     {
         return getMap( context, KEY_PROJECT_PARENT );
     }
 
-    public static List getProjectDevelopers( Map context )
+    public static List getProjectDevelopers( Map<String, Object> context )
     {
         return getList( context, KEY_PROJECT_DEVELOPERS );
     }
 
-    public static String getDeveloperName( Map context )
+    public static String getDeveloperName( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_DEVELOPER_NAME );
     }
 
-    public static String getDeveloperEmail( Map context )
+    public static String getDeveloperEmail( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_DEVELOPER_EMAIL );
     }
 
-    public static String getDeveloperScmId( Map context )
+    public static String getDeveloperScmId( Map<String, Object> context )
     {
         return getString( context, KEY_PROJECT_DEVELOPER_SCMID );
     }
 
-    public static List getProjectDependencies( Map context )
+    public static List getProjectDependencies( Map<String, Object> context )
     {
         return getList( context, KEY_PROJECT_DEPENDENCIES );
     }
 
-    public static List getProjectNotifiers( Map context )
+    public static List getProjectNotifiers( Map<String, Object> context )
     {
         return getList( context, KEY_PROJECT_NOTIFIERS );
     }
 
-    public static Map getNotifierConfiguration( Map context )
+    public static Map getNotifierConfiguration( Map<String, Object> context )
     {
         return getMap( context, KEY_NOTIFIER_CONFIGURATION );
     }
 
-    public static int getNotifierFrom( Map context )
+    public static int getNotifierFrom( Map<String, Object> context )
     {
         return getInteger( context, KEY_NOTIFIER_FROM );
     }
 
-    public static int getNotifierRecipientType( Map context )
+    public static int getNotifierRecipientType( Map<String, Object> context )
     {
         return getInteger( context, KEY_NOTIFIER_RECIPIENT_TYPE );
     }
 
-    public static String getNotifierType( Map context )
+    public static String getNotifierType( Map<String, Object> context )
     {
         return getString( context, KEY_NOTIFIER_TYPE );
     }
 
-    public static boolean isNotifierEnabled( Map context )
+    public static boolean isNotifierEnabled( Map<String, Object> context )
     {
         return getBoolean( context, KEY_NOTIFIER_ENABLED );
     }
 
-    public static boolean isNotifierSendOnError( Map context )
+    public static boolean isNotifierSendOnError( Map<String, Object> context )
     {
         return getBoolean( context, KEY_NOTIFIER_SEND_ON_ERROR );
     }
 
-    public static boolean isNotifierSendOnFailure( Map context )
+    public static boolean isNotifierSendOnFailure( Map<String, Object> context )
     {
         return getBoolean( context, KEY_NOTIFIER_SEND_ON_FAILURE );
     }
 
-    public static boolean isNotifierSendOnScmFailure( Map context )
+    public static boolean isNotifierSendOnScmFailure( Map<String, Object> context )
     {
         return getBoolean( context, KEY_NOTIFIER_SEND_ON_SCMFAILURE );
     }
 
-    public static boolean isNotifierSendOnSuccess( Map context )
+    public static boolean isNotifierSendOnSuccess( Map<String, Object> context )
     {
         return getBoolean( context, KEY_NOTIFIER_SEND_ON_SUCCESS );
     }
 
-    public static boolean isNotifierSendOnWarning( Map context )
+    public static boolean isNotifierSendOnWarning( Map<String, Object> context )
     {
         return getBoolean( context, KEY_NOTIFIER_SEND_ON_WARNING );
     }
 
-    public static Map getScmResult( Map context )
+    public static Map getScmResult( Map<String, Object> context )
     {
         return getMap( context, KEY_SCM_RESULT );
     }
 
-    public static Map getMavenProject( Map context )
+    public static Map getMavenProject( Map<String, Object> context )
     {
         return getMap( context, KEY_MAVEN_PROJECT );
     }
 
-    public static List<String> getProjectModules( Map context )
+    public static List<String> getProjectModules( Map<String, Object> context
)
     {
         return getList( context, KEY_PROJECT_MODULES );
     }
 
-    public static Date getLatestUpdateDate( Map context )
+    public static Date getLatestUpdateDate( Map<String, Object> context )
     {
         return getDate( context, KEY_LATEST_UPDATE_DATE );
     }
 
-    public static String getBuildAgentUrl( Map context )
+    public static String getBuildAgentUrl( Map<String, Object> context )
     {
         return getString( context, KEY_BUILD_AGENT_URL );
     }
@@ -493,7 +493,7 @@
     //
     // ----------------------------------------------------------------------
 
-    protected static String getString( Map context, String key )
+    protected static String getString( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
@@ -507,24 +507,24 @@
         }
     }
 
-    protected static String getString( Map context, String key, String defaultValue )
+    protected static String getString( Map<String, Object> context, String key, String
defaultValue )
     {
         return (String) getObject( context, key, defaultValue );
     }
 
-    protected static boolean getBoolean( Map context, String key )
+    protected static boolean getBoolean( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
         return obj != null && (Boolean) obj;
     }
 
-    protected static boolean getBoolean( Map context, String key, boolean defaultValue )
+    protected static boolean getBoolean( Map<String, Object> context, String key, boolean
defaultValue )
     {
         return (Boolean) getObject( context, key, defaultValue );
     }
 
-    protected static int getInteger( Map context, String key )
+    protected static int getInteger( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
@@ -538,7 +538,7 @@
         }
     }
 
-    protected static Date getDate( Map context, String key )
+    protected static Date getDate( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
@@ -552,7 +552,7 @@
         }
     }
 
-    protected static List getList( Map context, String key )
+    protected static List getList( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
@@ -571,7 +571,7 @@
         }
     }
 
-    protected static Map getMap( Map context, String key )
+    protected static Map getMap( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
@@ -585,7 +585,7 @@
         }
     }
 
-    protected static Object getObject( Map context, String key )
+    protected static Object getObject( Map<String, Object> context, String key )
     {
         if ( !context.containsKey( key ) )
         {
@@ -602,7 +602,7 @@
         return value;
     }
 
-    protected static Object getObject( Map context, String key, Object defaultValue )
+    protected static Object getObject( Map<String, Object> context, String key, Object
defaultValue )
     {
         Object value = context.get( key );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/continuum/release/distributed/DistributedReleaseUtil.java
Thu Apr 23 05:08:19 2009
@@ -100,112 +100,112 @@
 
     public static final String KEY_BUILD_AGENT_URL = "build-agent-url";
 
-    public static String getScmTag( Map context, String defaultValue )
+    public static String getScmTag( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_SCM_TAG, defaultValue );
     }
 
-    public static String getScmTagBase( Map context, String defaultValue )
+    public static String getScmTagBase( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_SCM_TAGBASE, defaultValue );
     }
 
-    public static String getArguments( Map context, String defaultValue )
+    public static String getArguments( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_ARGUMENTS, defaultValue );
     }
 
-    public static String getPrepareGoals( Map context, String defaultValue )
+    public static String getPrepareGoals( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_PREPARE_GOALS, defaultValue );
     }
 
-    public static String getScmCommentPrefix( Map context, String defaultValue )
+    public static String getScmCommentPrefix( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_SCM_COMMENT_PREFIX, defaultValue );
     }
 
-    public static Boolean getAutoVersionSubmodules( Map context, boolean defaultValue )
+    public static Boolean getAutoVersionSubmodules( Map<String, Object> context, boolean
defaultValue )
     {
         return getBoolean( context, KEY_AUTO_VERSION_SUBMODULES, defaultValue );
     }
 
-    public static Boolean getAddSchema( Map context, boolean defaultValue )
+    public static Boolean getAddSchema( Map<String, Object> context, boolean defaultValue
)
     {
         return getBoolean( context, KEY_ADD_SCHEMA, defaultValue );
     }
 
-    public static Long getStartTime( Map context )
+    public static Long getStartTime( Map<String, Object> context )
     {
         return new Long( getString( context, KEY_START_TIME ) );
     }
 
-    public static Long getEndTime( Map context )
+    public static Long getEndTime( Map<String, Object> context )
     {
         return new Long( getString( context, KEY_END_TIME ) );
     }
 
-    public static int getReleaseResultCode( Map context )
+    public static int getReleaseResultCode( Map<String, Object> context )
     {
         return getInteger( context, KEY_RELEASE_RESULT_CODE );
     }
 
-    public static String getReleaseOutput( Map context )
+    public static String getReleaseOutput( Map<String, Object> context )
     {
         return getString( context, KEY_RELEASE_OUTPUT );
     }
 
-    public static int getReleaseState( Map context )
+    public static int getReleaseState( Map<String, Object> context )
     {
         return getInteger( context, KEY_RELEASE_STATE );
     }
 
-    public static List getReleasePhases( Map context )
+    public static List getReleasePhases( Map<String, Object> context )
     {
         return getList( context, KEY_RELEASE_PHASES, new ArrayList() );
     }
 
-    public static List getCompletedReleasePhases( Map context )
+    public static List getCompletedReleasePhases( Map<String, Object> context )
     {
         return getList( context, KEY_COMPLETED_RELEASE_PHASES, new ArrayList() );
     }
 
-    public static String getReleaseInProgress( Map context )
+    public static String getReleaseInProgress( Map<String, Object> context )
     {
         return getString( context, KEY_RELEASE_IN_PROGRESS, "" );
     }
 
-    public static String getReleaseError( Map context )
+    public static String getReleaseError( Map<String, Object> context )
     {
         return getString( context, KEY_RELEASE_ERROR, null );
     }
 
-    public static boolean getUseReleaseProfile( Map context, boolean defaultValue )
+    public static boolean getUseReleaseProfile( Map<String, Object> context, boolean
defaultValue )
     {
         return getBoolean( context, KEY_USE_RELEASE_PROFILE, defaultValue );
     }
 
-    public static String getGoals( Map context, String defaultValue )
+    public static String getGoals( Map<String, Object> context, String defaultValue
)
     {
         return getString( context, KEY_GOALS, defaultValue );
     }
 
-    public static String getReleaseId( Map context )
+    public static String getReleaseId( Map<String, Object> context )
     {
         return getString( context, KEY_RELEASE_ID );
     }
 
-    public static String getReleaseGoal( Map context )
+    public static String getReleaseGoal( Map<String, Object> context )
     {
         return getString( context, KEY_RELEASE_GOAL );
     }
 
-    public static String getBuildAgentUrl( Map context )
+    public static String getBuildAgentUrl( Map<String, Object> context )
     {
         return getString( context, KEY_BUILD_AGENT_URL );
     }
 
-    public static int getProjectId( Map context )
+    public static int getProjectId( Map<String, Object> context )
     {
         return getInteger( context, KEY_PROJECT_ID );
     }
@@ -214,37 +214,37 @@
     //
     // ----------------------------------------------------------------------
 
-    public static Integer getInteger( Map context, String key )
+    public static Integer getInteger( Map<String, Object> context, String key )
     {
         return (Integer) getObject( context, key );
     }
 
-    public static Integer getInteger( Map context, String key, Object defaultValue )
+    public static Integer getInteger( Map<String, Object> context, String key, Object
defaultValue )
     {
         return (Integer) getObject( context, key, defaultValue );
     }
 
-    public static String getString( Map context, String key )
+    public static String getString( Map<String, Object> context, String key )
     {
         return (String) getObject( context, key );
     }
 
-    public static String getString( Map context, String key, String defaultValue )
+    public static String getString( Map<String, Object> context, String key, String
defaultValue )
     {
         return (String) getObject( context, key, defaultValue );
     }
 
-    public static boolean getBoolean( Map context, String key )
+    public static boolean getBoolean( Map<String, Object> context, String key )
     {
         return (Boolean) getObject( context, key );
     }
 
-    public static boolean getBoolean( Map context, String key, boolean defaultValue )
+    public static boolean getBoolean( Map<String, Object> context, String key, boolean
defaultValue )
     {
         return (Boolean) getObject( context, key, defaultValue );
     }
 
-    public static List getList( Map context, String key, Object defaultValue )
+    public static List getList( Map<String, Object> context, String key, Object defaultValue
)
     {
         Object obj = getObject( context, key, defaultValue );
 
@@ -271,7 +271,7 @@
         }
     }
 
-    protected static Object getObject( Map context, String key )
+    protected static Object getObject( Map<String, Object> context, String key )
     {
         if ( !context.containsKey( key ) )
         {
@@ -288,7 +288,7 @@
         return value;
     }
 
-    protected static Object getObject( Map context, String key, Object defaultValue )
+    protected static Object getObject( Map<String, Object> context, String key, Object
defaultValue )
     {
         Object value = context.get( key );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Thu Apr 23 05:08:19 2009
@@ -858,8 +858,7 @@
         {
             Collection<Project> projectsList;
 
-            projectsList =
-                getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId(
projectGroupId ) );
+            projectsList = getProjectsInBuildOrder( projectDao.getProjectsWithDependenciesByGroupId(
projectGroupId ) );
 
             prepareBuildProjects( projectsList, bds, checkDefaultBuildDefinitionForProject,
                                   ContinuumProjectState.TRIGGER_FORCED );
@@ -869,9 +868,9 @@
     /**
      * takes a given schedule and determines which projects need to build
      * <p/>
-     * The build order is determined by the
+     * The build order is determined by the dependencies
      *
-     * @param schedule
+     * @param schedule The schedule
      * @throws ContinuumException
      */
     public void buildProjects( Schedule schedule )
@@ -879,7 +878,7 @@
     {
         Collection<Project> projectsList;
 
-        Map projectsMap = null;
+        Map projectsMap;
 
         try
         {

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Thu Apr 23 05:08:19 2009
@@ -145,7 +145,7 @@
                 return;
             }
 
-            Map actionContext = context.getActionContext();
+            Map<String, Object> actionContext = context.getActionContext();
 
             try
             {
@@ -369,7 +369,7 @@
             throw new TaskExecutionException( "Error initializing the build context", e );
         }
 
-        Map actionContext = context.getActionContext();
+        Map<String, Object> actionContext = context.getActionContext();
 
         actionContext.put( AbstractContinuumAction.KEY_PROJECT_ID, projectId );
 
@@ -396,8 +396,8 @@
     private void performAction( String actionName, BuildContext context )
         throws TaskExecutionException
     {
-        String error = null;
-        TaskExecutionException exception = null;
+        String error;
+        TaskExecutionException exception;
 
         try
         {
@@ -744,5 +744,4 @@
 
         return false;
     }
-
 }

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum/core/action/AbstractContinuumAction.java
Thu Apr 23 05:08:19 2009
@@ -27,6 +27,7 @@
 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 org.apache.maven.continuum.model.project.ProjectDependency;
 import org.apache.maven.continuum.model.project.ProjectGroup;
 import org.apache.maven.continuum.model.scm.ScmResult;
 import org.codehaus.plexus.action.AbstractAction;
@@ -102,127 +103,128 @@
     //
     // ----------------------------------------------------------------------
 
-    public static int getProjectId( Map context )
+    public static int getProjectId( Map<String, Object> context )
     {
         return getInteger( context, KEY_PROJECT_ID );
     }
 
-    public static Project getProject( Map context )
+    public static Project getProject( Map<String, Object> context )
     {
         return (Project) getObject( context, KEY_PROJECT );
     }
 
-    public static int getProjectGroupId( Map context )
+    public static int getProjectGroupId( Map<String, Object> context )
     {
         return getInteger( context, KEY_PROJECT_GROUP_ID );
     }
 
-    public static BuildDefinitionTemplate getBuildDefinitionTemplate( Map context )
+    public static BuildDefinitionTemplate getBuildDefinitionTemplate( Map<String, Object>
context )
     {
         return (BuildDefinitionTemplate) getObject( context, KEY_BUILD_DEFINITION_TEMPLATE,
null );
     }
 
-    public static BuildDefinition getBuildDefinition( Map context )
+    public static BuildDefinition getBuildDefinition( Map<String, Object> context )
     {
         return (BuildDefinition) getObject( context, KEY_BUILD_DEFINITION, null );
     }
 
-    public static int getBuildDefinitionId( Map context )
+    public static int getBuildDefinitionId( Map<String, Object> context )
     {
         return getInteger( context, KEY_BUILD_DEFINITION_ID );
     }
 
-    public static String getBuildId( Map context )
+    public static String getBuildId( Map<String, Object> context )
     {
         return getString( context, KEY_BUILD_ID );
     }
 
-    public static int getTrigger( Map context )
+    public static int getTrigger( Map<String, Object> context )
     {
         return getInteger( context, KEY_TRIGGER );
     }
 
-    public static Project getUnvalidatedProject( Map context )
+    public static Project getUnvalidatedProject( Map<String, Object> context )
     {
         return (Project) getObject( context, KEY_UNVALIDATED_PROJECT );
     }
 
-    public static ProjectGroup getUnvalidatedProjectGroup( Map context )
+    public static ProjectGroup getUnvalidatedProjectGroup( Map<String, Object> context
)
     {
         return (ProjectGroup) getObject( context, KEY_UNVALIDATED_PROJECT_GROUP );
     }
 
-    public static File getWorkingDirectory( Map context )
+    public static File getWorkingDirectory( Map<String, Object> context )
     {
         return new File( getString( context, KEY_WORKING_DIRECTORY ) );
     }
 
-    public static ScmResult getCheckoutResult( Map context, Object defaultValue )
+    public static ScmResult getCheckoutResult( Map<String, Object> context, Object
defaultValue )
     {
         return (ScmResult) getObject( context, KEY_CHECKOUT_SCM_RESULT, defaultValue );
     }
 
-    public static ScmResult getUpdateScmResult( Map context )
+    public static ScmResult getUpdateScmResult( Map<String, Object> context )
     {
         return getUpdateScmResult( context, null );
     }
 
-    public static ScmResult getUpdateScmResult( Map context, ScmResult defaultValue )
+    public static ScmResult getUpdateScmResult( Map<String, Object> context, ScmResult
defaultValue )
     {
         return (ScmResult) getObject( context, KEY_UPDATE_SCM_RESULT, defaultValue );
     }
 
-    public static List getUpdatedDependencies( Map context )
+    public static List<ProjectDependency> getUpdatedDependencies( Map<String, Object>
context )
     {
         return getUpdatedDependencies( context, null );
     }
 
-    public static List getUpdatedDependencies( Map context, List defaultValue )
+    public static List<ProjectDependency> getUpdatedDependencies( Map<String, Object>
context,
+                                                                  List<ProjectDependency>
defaultValue )
     {
-        return (List) getObject( context, KEY_UPDATE_DEPENDENCIES, defaultValue );
+        return (List<ProjectDependency>) getObject( context, KEY_UPDATE_DEPENDENCIES,
defaultValue );
     }
 
-    public static ScmResult getScmResult( Map context )
+    public static ScmResult getScmResult( Map<String, Object> context )
     {
         return getScmResult( context, null );
     }
 
-    public static ScmResult getScmResult( Map context, ScmResult defaultValue )
+    public static ScmResult getScmResult( Map<String, Object> context, ScmResult defaultValue
)
     {
         return (ScmResult) getObject( context, KEY_SCM_RESULT, defaultValue );
     }
 
-    public static ScmResult getOldScmResult( Map context )
+    public static ScmResult getOldScmResult( Map<String, Object> context )
     {
         return getOldScmResult( context, null );
     }
 
-    public static ScmResult getOldScmResult( Map context, ScmResult defaultValue )
+    public static ScmResult getOldScmResult( Map<String, Object> context, ScmResult
defaultValue )
     {
         return (ScmResult) getObject( context, KEY_OLD_SCM_RESULT, defaultValue );
     }
 
-    public static ProjectScmRoot getProjectScmRoot( Map context )
+    public static ProjectScmRoot getProjectScmRoot( Map<String, Object> context )
     {
         return (ProjectScmRoot) getObject( context, KEY_PROJECT_SCM_ROOT );
     }
 
-    public static int getOldBuildId( Map context )
+    public static int getOldBuildId( Map<String, Object> context )
     {
         return getInteger( context, KEY_OLD_BUILD_ID );
     }
 
-    public static List<Project> getListOfProjects( Map context )
+    public static List<Project> getListOfProjects( Map<String, Object> context
)
     {
         return (List<Project>) getObject( context, KEY_PROJECTS );
     }
 
-    public static Map<Integer, BuildDefinition> getProjectsBuildDefinitionsMap( Map
context )
+    public static Map<Integer, BuildDefinition> getProjectsBuildDefinitionsMap( Map<String,
Object> context )
     {
         return (Map<Integer, BuildDefinition>) getObject( context, KEY_PROJECTS_BUILD_DEFINITIONS_MAP
);
     }
 
-    public static Map<Integer, ScmResult> getScmResultMap( Map context )
+    public static Map<Integer, ScmResult> getScmResultMap( Map<String, Object>
context )
     {
         return (Map<Integer, ScmResult>) getObject( context, KEY_SCM_RESULT_MAP );
     }
@@ -231,27 +233,27 @@
     //
     // ----------------------------------------------------------------------
 
-    protected static String getString( Map context, String key )
+    protected static String getString( Map<String, Object> context, String key )
     {
         return (String) getObject( context, key );
     }
 
-    protected static String getString( Map context, String key, String defaultValue )
+    protected static String getString( Map<String, Object> context, String key, String
defaultValue )
     {
         return (String) getObject( context, key, defaultValue );
     }
 
-    public static boolean getBoolean( Map context, String key )
+    public static boolean getBoolean( Map<String, Object> context, String key )
     {
         return (Boolean) getObject( context, key );
     }
 
-    public static boolean getBoolean( Map context, String key, boolean defaultValue )
+    public static boolean getBoolean( Map<String, Object> context, String key, boolean
defaultValue )
     {
         return (Boolean) getObject( context, key, defaultValue );
     }
 
-    protected static int getInteger( Map context, String key )
+    protected static int getInteger( Map<String, Object> context, String key )
     {
         Object obj = getObject( context, key, null );
 
@@ -265,7 +267,7 @@
         }
     }
 
-    protected static Object getObject( Map context, String key )
+    protected static Object getObject( Map<String, Object> context, String key )
     {
         if ( !context.containsKey( key ) )
         {
@@ -282,7 +284,7 @@
         return value;
     }
 
-    protected static Object getObject( Map context, String key, Object defaultValue )
+    protected static Object getObject( Map<String, Object> context, String key, Object
defaultValue )
     {
         Object value = context.get( key );
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/core/action/CreateProjectsFromMetadataTest.java
Thu Apr 23 05:08:19 2009
@@ -90,7 +90,7 @@
     public void testExecuteWithNonRecursiveMode()
         throws Exception
     {
-        Map context = new HashMap();
+        Map<String, Object> context = new HashMap<String, Object>();
         context.put( CreateProjectsFromMetadataAction.KEY_URL,
                      "http://svn.apache.org/repos/asf/maven/continuum/trunk/pom.xml" );
         context.put( CreateProjectsFromMetadataAction.KEY_PROJECT_BUILDER_ID, "id" );

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilderTest.java
Thu Apr 23 05:08:19 2009
@@ -391,11 +391,11 @@
         assertEquals( 0, projectGroup.getProjects().size() );
     }
 
-    private void assertDependency( String dep, String proj, Map projects )
+    private void assertDependency( String dep, String proj, Map<String, Project> projects
)
     {
-        Project p = (Project) projects.get( proj );
+        Project p = projects.get( proj );
 
-        Project dependency = (Project) projects.get( dep );
+        Project dependency = projects.get( dep );
 
         assertNotNull( p );
 
@@ -419,12 +419,12 @@
     //
     // ----------------------------------------------------------------------
 
-    private Project getProject( String name, Map projects )
+    private Project getProject( String name, Map<String, Project> projects )
     {
-        return (Project) projects.get( name );
+        return projects.get( name );
     }
 
-    private void assertMavenTwoProject( String name, Map projects )
+    private void assertMavenTwoProject( String name, Map<String, Project> projects
)
     {
         Project project = getProject( name, projects );
 
@@ -437,7 +437,7 @@
         assertTrue( project.getScmUrl().startsWith( scmUrl ) );
     }
 
-    private void assertScmUrl( String name, Map projects, String scmUrl )
+    private void assertScmUrl( String name, Map<String, Project> projects, String scmUrl
)
     {
         assertMavenTwoProject( name, projects );
 

Modified: continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java?rev=767796&r1=767795&r2=767796&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-store/src/main/java/org/apache/continuum/dao/DaoUtilsImpl.java
Thu Apr 23 05:08:19 2009
@@ -178,11 +178,11 @@
             for ( Iterator i = projectGroupSource.keySet().iterator(); i.hasNext(); )
             {
                 Integer projectGroupId = (Integer) i.next();
-                List projectsInGroup = projectDao.getProjectsInGroup( projectGroupId );
+                List<Project> projectsInGroup = projectDao.getProjectsInGroup( projectGroupId
);
 
-                for ( Iterator j = projectsInGroup.iterator(); j.hasNext(); )
+                for ( Project p : projectsInGroup )
                 {
-                    Integer projectId = ( (Project) j.next() ).getId();
+                    Integer projectId = p.getId();
                     if ( !aggregate.keySet().contains( projectId ) )
                     {
                         aggregate.put( projectId, projectGroupSource.get( projectGroupId
) );



Mime
View raw message