continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r548370 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Date Mon, 18 Jun 2007 14:42:18 GMT
Author: evenisse
Date: Mon Jun 18 07:42:17 2007
New Revision: 548370

URL: http://svn.apache.org/viewvc?view=rev&rev=548370
Log:
[CONTINUUM-1314] Fix possible NPE

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java?view=diff&rev=548370&r1=548369&r2=548370
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/DefaultContinuum.java
Mon Jun 18 07:42:17 2007
@@ -478,18 +478,21 @@
         {
             BuildProjectTask task = (BuildProjectTask) it.next();
 
-            if ( buildDefinitionId < 0 )
+            if ( task != null )
             {
-                if ( task.getProjectId() == projectId )
+                if ( buildDefinitionId < 0 )
                 {
-                    return true;
+                    if ( task.getProjectId() == projectId )
+                    {
+                        return true;
+                    }
                 }
-            }
-            else
-            {
-                if ( task.getProjectId() == projectId && task.getBuildDefinitionId()
== buildDefinitionId )
+                else
                 {
-                    return true;
+                    if ( task.getProjectId() == projectId && task.getBuildDefinitionId()
== buildDefinitionId )
+                    {
+                        return true;
+                    }
                 }
             }
         }
@@ -515,7 +518,7 @@
         {
             CheckOutTask task = (CheckOutTask) it.next();
 
-            if ( task.getProjectId() == projectId )
+            if ( task != null && task.getProjectId() == projectId )
             {
                 return true;
             }
@@ -1418,7 +1421,7 @@
         for ( Iterator i = projects.iterator(); i.hasNext(); )
         {
             Project project = (Project) i.next();
-            
+
             project.setScmUseCache( useCredentialsCache );
 
             projectGroup.addProject( project );



Mime
View raw message