continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r394934 - in /maven/continuum/branches/continuum-1.0.x: continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Tue, 18 Apr 2006 13:09:30 GMT
Author: evenisse
Date: Tue Apr 18 06:09:24 2006
New Revision: 394934

URL: http://svn.apache.org/viewcvs?rev=394934&view=rev
Log:
Use updateBuildDefinition instead of updateProject in ShellIntegrationTest and fix possible
NPE

Modified:
    maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
    maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java?rev=394934&r1=394933&r2=394934&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core-it/src/test/java/org/apache/maven/continuum/it/ShellIntegrationTest.java
Tue Apr 18 06:09:24 2006
@@ -89,7 +89,7 @@
         Project shellProject = continuum.getProjectWithAllDetails( projectId );
         bd = (BuildDefinition) shellProject.getBuildDefinitions().iterator().next();
         bd.setArguments( "a b" );
-        continuum.updateProject( shellProject );
+        continuum.updateBuildDefinition( bd, shellProject.getId() );
 
         // TODO: change all details to build details
         shellProject = continuum.getProjectWithAllDetails( projectId );

Modified: maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewcvs/maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?rev=394934&r1=394933&r2=394934&view=diff
==============================================================================
--- maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/branches/continuum-1.0.x/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Tue Apr 18 06:09:24 2006
@@ -1117,7 +1117,23 @@
 
         bd.setArguments( buildDefinition.getArguments() );
 
-        Schedule schedule = getSchedule( buildDefinition.getSchedule().getId() );
+        Schedule schedule;
+
+        if ( buildDefinition.getSchedule() == null )
+        {
+            try
+            {
+                schedule = store.getScheduleByName( DefaultContinuumInitializer.DEFAULT_SCHEDULE_NAME
);
+            }
+            catch ( ContinuumStoreException e )
+            {
+                throw new ContinuumException( "Can't get default schedule.", e );
+            }
+        }
+        else
+        {
+            schedule = getSchedule( buildDefinition.getSchedule().getId() );
+        }
 
         bd.setSchedule( schedule );
 



Mime
View raw message