continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r563237 - /maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
Date Mon, 06 Aug 2007 19:48:23 GMT
Author: evenisse
Date: Mon Aug  6 12:48:18 2007
New Revision: 563237

URL: http://svn.apache.org/viewvc?view=rev&rev=563237
Log:
Fix shouldNotity when previous build doesn't exist

Modified:
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java?view=diff&rev=563237&r1=563236&r2=563237
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
Mon Aug  6 12:48:18 2007
@@ -124,6 +124,16 @@
         // Send if this is the first build
         if ( previousBuild == null )
         {
+            if ( build.getState() == ContinuumProjectState.ERROR )
+            {
+                return projectNotifier.isSendOnError();
+            }
+
+            if ( build.getState() == ContinuumProjectState.FAILED )
+            {
+                return projectNotifier.isSendOnFailure();
+            }
+
             if ( build.getState() == ContinuumProjectState.OK )
             {
                 return projectNotifier.isSendOnSuccess();
@@ -133,6 +143,8 @@
             {
                 return projectNotifier.isSendOnWarning();
             }
+
+            return true;
         }
 
         // Send if the state has changed



Mime
View raw message