continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r358368 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Date Wed, 21 Dec 2005 20:33:42 GMT
Author: evenisse
Date: Wed Dec 21 12:33:38 2005
New Revision: 358368

URL: http://svn.apache.org/viewcvs?rev=358368&view=rev
Log:
Fix NPE

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java?rev=358368&r1=358367&r2=358368&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/SummaryAction.java
Wed Dec 21 12:33:38 2005
@@ -96,18 +96,24 @@
 
                 model.setBuildNumber( project.getBuildNumber() );
 
-                BuildResult buildInSuccess = (BuildResult) buildResultsInSuccess.get( new
Integer( project.getId() ) );
-
-                if ( buildInSuccess != null )
+                if ( buildResultsInSuccess != null )
                 {
-                    model.setBuildInSuccessId( buildInSuccess.getId() );
-                }
+                    BuildResult buildInSuccess = (BuildResult) buildResultsInSuccess.get(
new Integer( project.getId() ) );
 
-                BuildResult latestBuild = (BuildResult) buildResults.get( new Integer( project.getId()
) );
+                    if ( buildInSuccess != null )
+                    {
+                        model.setBuildInSuccessId( buildInSuccess.getId() );
+                    }
+                }
 
-                if ( latestBuild != null )
+                if ( buildResults != null )
                 {
-                    model.setLatestBuildId( latestBuild.getId() );
+                    BuildResult latestBuild = (BuildResult) buildResults.get( new Integer(
project.getId() ) );
+
+                    if ( latestBuild != null )
+                    {
+                        model.setLatestBuildId( latestBuild.getId() );
+                    }
                 }
 
                 summary.add( model );
@@ -119,6 +125,7 @@
         {
             e.printStackTrace();
         }
+
         return SUCCESS;
     }
 



Mime
View raw message