continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r770064 - in /continuum/branches/continuum-1.3.x/continuum-core/src/main/java/org/apache/maven/continuum: buildcontroller/DefaultBuildController.java core/action/AbstractContinuumAction.java
Date Thu, 30 Apr 2009 04:57:27 GMT
Author: evenisse
Date: Thu Apr 30 04:57:27 2009
New Revision: 770064

URL: http://svn.apache.org/viewvc?rev=770064&view=rev
Log:
[CONTINUUM-2212] Fix RuntimeException when the project doesn't need to be built.
Submitted by Chritian Schulte

Modified:
    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

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=770064&r1=770063&r2=770064&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 30 04:57:27 2009
@@ -165,7 +165,7 @@
 
             context.setCancelled( (Boolean) actionContext.get( AbstractContinuumAction.KEY_CANCELLED
) );
 
-            String s = AbstractContinuumAction.getBuildId( actionContext );
+            String s = AbstractContinuumAction.getBuildId( actionContext, null );
 
             if ( s != null && !context.isCancelled() )
             {
@@ -213,19 +213,14 @@
             {
                 try
                 {
-                    String s = AbstractContinuumAction.getBuildId( context.getActionContext()
);
+                    String s = AbstractContinuumAction.getBuildId( context.getActionContext(),
null );
 
                     if ( s != null )
                     {
                         BuildResult buildResult = buildResultDao.getBuildResult( Integer.valueOf(
s ) );
                         project.setState( buildResult.getState() );
+                        projectDao.updateProject( project );
                     }
-                    else
-                    {
-                        project.setState( ContinuumProjectState.ERROR );
-                    }
-
-                    projectDao.updateProject( project );
                 }
                 catch ( ContinuumStoreException e )
                 {

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=770064&r1=770063&r2=770064&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 30 04:57:27 2009
@@ -138,6 +138,11 @@
         return getString( context, KEY_BUILD_ID );
     }
 
+    public static String getBuildId( Map<String, Object> context, String defaultValue
)
+    {
+        return getString( context, KEY_BUILD_ID, defaultValue );
+    }
+
     public static int getTrigger( Map<String, Object> context )
     {
         return getInteger( context, KEY_TRIGGER );



Mime
View raw message