continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r592180 - in /maven/continuum/trunk/continuum-notifiers: continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/ continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/
Date Mon, 05 Nov 2007 23:15:00 GMT
Author: olamy
Date: Mon Nov  5 15:14:59 2007
New Revision: 592180

URL: http://svn.apache.org/viewvc?rev=592180&view=rev
Log:
[CONTINUUM-1548] fix NPE in IRC Notifier 

Modified:
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
    maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.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?rev=592180&r1=592179&r2=592180&view=diff
==============================================================================
--- 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 Nov  5 15:14:59 2007
@@ -190,7 +190,7 @@
         {
             if ( buildDef != null )
             {
-                builds = store.getBuildResultsByBuildDefinition( project.getId(), buildDef.getId(),
0, 2 );
+                builds = getContinuumStore().getBuildResultsByBuildDefinition( project.getId(),
buildDef.getId(), 0, 2 );
 
                 if ( builds.size() < 2 )
                 {
@@ -214,7 +214,7 @@
                 //Normally, it isn't possible, buildDef should be != null
                 if ( project.getId() > 0 )
                 {
-                    project = store.getProjectWithBuilds( project.getId() );
+                    project = getContinuumStore().getProjectWithBuilds( project.getId() );
                 }
                 builds = project.getBuildResults();
 
@@ -241,4 +241,8 @@
         }
     }
 
+    protected ContinuumStore getContinuumStore()
+    {
+        return this.store;
+    }
 }

Modified: maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java?rev=592180&r1=592179&r2=592180&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
(original)
+++ maven/continuum/trunk/continuum-notifiers/continuum-notifier-irc/src/main/java/org/apache/maven/continuum/notification/irc/IrcContinuumNotifier.java
Mon Nov  5 15:14:59 2007
@@ -28,6 +28,7 @@
 import org.apache.maven.continuum.notification.AbstractContinuumNotifier;
 import org.apache.maven.continuum.notification.ContinuumNotificationDispatcher;
 import org.apache.maven.continuum.project.ContinuumProjectState;
+import org.apache.maven.continuum.store.ContinuumStore;
 import org.codehaus.plexus.notification.NotificationException;
 import org.codehaus.plexus.personality.plexus.lifecycle.phase.Disposable;
 import org.codehaus.plexus.util.StringUtils;
@@ -64,6 +65,11 @@
     // ----------------------------------------------------------------------
 
     /**
+     * @plexus.requirement role-hint="jdo"
+     */
+    private ContinuumStore store;    
+    
+    /**
      * @plexus.requirement
      */
     private ConfigurationService configurationService;
@@ -506,4 +512,8 @@
         }
     }
 
+    protected ContinuumStore getContinuumStore()
+    {
+        return this.store;
+    }    
 }



Mime
View raw message