continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1069246 - in /continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent: action/CheckoutProjectAction.java build/execution/AbstractBuildExecutor.java
Date Thu, 10 Feb 2011 07:04:50 GMT
Author: ctan
Date: Thu Feb 10 07:04:50 2011
New Revision: 1069246

URL: http://svn.apache.org/viewvc?rev=1069246&view=rev
Log:
[CONTINUUM-2607] prevent setting null values in the parameters

Modified:
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java
    continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java?rev=1069246&r1=1069245&r2=1069246&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/action/CheckoutProjectAction.java
Thu Feb 10 07:04:50 2011
@@ -68,9 +68,9 @@ public class CheckoutProjectAction
         try
         {
             String scmUserName =
-                ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_USERNAME,
"" );
+                ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_USERNAME,
project.getScmUsername() );
             String scmPassword =
-                ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_PASSWORD,
"" );
+                ContinuumBuildAgentUtil.getString( context, ContinuumBuildAgentUtil.KEY_SCM_PASSWORD,
project.getScmPassword() );
 
             ContinuumScmConfiguration config =
                 createScmConfiguration( project, workingDirectory, scmUserName, scmPassword
);

Modified: continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java?rev=1069246&r1=1069245&r2=1069246&view=diff
==============================================================================
--- continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
(original)
+++ continuum/trunk/continuum-buildagent/continuum-buildagent-core/src/main/java/org/apache/continuum/buildagent/build/execution/AbstractBuildExecutor.java
Thu Feb 10 07:04:50 2011
@@ -410,7 +410,14 @@ public abstract class AbstractBuildExecu
             for ( ProjectDeveloper developer : developers )
             {
                 Map<String, String> map = new HashMap<String, String>();
-                map.put( ContinuumBuildAgentUtil.KEY_PROJECT_DEVELOPER_NAME, developer.getName()
);
+                if ( StringUtils.isNotEmpty( developer.getName() ) )
+                {
+                    map.put( ContinuumBuildAgentUtil.KEY_PROJECT_DEVELOPER_NAME, developer.getName()
);
+                }
+                else
+                {
+                    map.put( ContinuumBuildAgentUtil.KEY_PROJECT_DEVELOPER_NAME, "" );
+                }
                 if ( StringUtils.isNotEmpty( developer.getEmail() ) )
                 {
                 	map.put( ContinuumBuildAgentUtil.KEY_PROJECT_DEVELOPER_EMAIL, developer.getEmail()
);
@@ -477,9 +484,23 @@ public abstract class AbstractBuildExecu
             for ( ProjectDependency dependency : dependencies )
             {
                 Map<String, Object> map = new HashMap<String, Object>();
-                map.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, dependency.getGroupId() );
-                map.put( ContinuumBuildAgentUtil.KEY_ARTIFACT_ID, dependency.getArtifactId()
);
-                if ( StringUtils.isNotBlank( dependency.getVersion() ) )
+                if ( StringUtils.isNotEmpty( dependency.getGroupId() ) )
+                {
+                    map.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, dependency.getGroupId()
);
+                }
+                else
+                {
+                    map.put( ContinuumBuildAgentUtil.KEY_GROUP_ID, "" );
+                }
+                if ( StringUtils.isNotEmpty( dependency.getArtifactId() ) )
+                {
+                    map.put( ContinuumBuildAgentUtil.KEY_ARTIFACT_ID, dependency.getArtifactId()
);
+                }
+                else
+                {
+                    map.put( ContinuumBuildAgentUtil.KEY_ARTIFACT_ID, "" );
+                }
+                if ( StringUtils.isNotEmpty( dependency.getVersion() ) )
                 {
                     map.put( ContinuumBuildAgentUtil.KEY_PROJECT_VERSION, dependency.getVersion()
);
                 }



Mime
View raw message