continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r954720 - /continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
Date Tue, 15 Jun 2010 06:18:51 GMT
Author: ctan
Date: Tue Jun 15 06:18:51 2010
New Revision: 954720

URL: http://svn.apache.org/viewvc?rev=954720&view=rev
Log:
prevent NPE when build result or project is null

Modified:
    continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java

Modified: continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
URL: http://svn.apache.org/viewvc/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java?rev=954720&r1=954719&r2=954720&view=diff
==============================================================================
--- continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
(original)
+++ continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/notification/mail/MailContinuumNotifier.java
Tue Jun 15 06:18:51 2010
@@ -251,8 +251,17 @@ public class MailContinuumNotifier
         Project project = context.getProject();
         List<ProjectNotifier> notifiers = context.getNotifiers();
         BuildResult build = context.getBuildResult();
-        log.error( "br state="+build.getState() );
-        log.error( "project state="+project.getState() );
+
+        if ( build != null )
+        {
+            log.error( "br state="+build.getState() );
+        }
+
+        if ( project != null )
+        {
+            log.error( "project state="+project.getState() );
+        }
+
         BuildDefinition buildDefinition = context.getBuildDefinition();
         ProjectScmRoot projectScmRoot = context.getProjectScmRoot();
 



Mime
View raw message