continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r822553 - in /continuum/branches/continuum-1.3.x/continuum-core/src: main/java/org/apache/maven/continuum/DefaultContinuum.java test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
Date Wed, 07 Oct 2009 02:19:20 GMT
Author: ctan
Date: Wed Oct  7 02:19:20 2009
New Revision: 822553

URL: http://svn.apache.org/viewvc?rev=822553&view=rev
Log:
fixed potential NPE

Modified:
    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/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java

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=822553&r1=822552&r2=822553&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
Wed Oct  7 02:19:20 2009
@@ -3218,6 +3218,11 @@
     private void removeProjectScmRoot( ProjectScmRoot projectScmRoot )
         throws ContinuumException
     {
+        if ( projectScmRoot == null )
+        {
+            return;
+        }
+
         //get all projects in the group
         ProjectGroup group = getProjectGroupWithProjects( projectScmRoot.getProjectGroup().getId()
);
 

Modified: continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
URL: http://svn.apache.org/viewvc/continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java?rev=822553&r1=822552&r2=822553&view=diff
==============================================================================
--- continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
(original)
+++ continuum/branches/continuum-1.3.x/continuum-core/src/test/java/org/apache/maven/continuum/scm/queue/PrepareBuildProjectsTaskExecutorTest.java
Wed Oct  7 02:19:20 2009
@@ -111,6 +111,8 @@
         assertTrue( "checkout directory of project 'module-A' does not exist.", new File(
workingDir, Integer.toString( moduleA.getId() ) ).exists() );
 
         assertTrue( "checkout directory of project 'module-B' does not exist.", new File(
workingDir, Integer.toString( moduleB.getId() ) ).exists() );
+
+        Thread.sleep( 5000 );
     }
 
     public void testCheckoutPrepareBuildMultiModuleProjectFreshBuild()
@@ -145,6 +147,8 @@
         assertTrue( "checkout directory of project 'module-A' does not exist.", new File(
workingDir, Integer.toString( moduleA.getId() ) ).exists() );
 
         assertTrue( "checkout directory of project 'module-B' does not exist.", new File(
workingDir, Integer.toString( moduleB.getId() ) ).exists() );
+
+        Thread.sleep( 5000 );
     }
 /*
     public void testCheckoutPrepareBuildSingleCheckedoutMultiModuleProject()



Mime
View raw message