continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r331889 - /maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java
Date Tue, 08 Nov 2005 21:09:36 GMT
Author: evenisse
Date: Tue Nov  8 13:09:34 2005
New Revision: 331889

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

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/viewcvs/maven/continuum/trunk/continuum-notifiers/continuum-notifier-api/src/main/java/org/apache/maven/continuum/notification/AbstractContinuumNotifier.java?rev=331889&r1=331888&r2=331889&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
Tue Nov  8 13:09:34 2005
@@ -42,13 +42,16 @@
 
             StringBuffer buf = new StringBuffer( configurationService.getUrl() );
 
-            if ( !buf.toString().endsWith( "/" ) )
+            if ( project != null || build != null )
             {
-                buf.append( "/" );
-            }
+                if ( !buf.toString().endsWith( "/" ) )
+                {
+                    buf.append( "/" );
+                }
 
-            buf.append( "target/ProjectBuild.vm/view/ProjectBuild/id/" ).append( project.getId()
).append(
-                "/buildId/" ).append( build.getId() );
+                buf.append( "target/ProjectBuild.vm/view/ProjectBuild/id/" ).append( project.getId()
).append(
+                    "/buildId/" ).append( build.getId() );
+            }
 
             return buf.toString();
         }



Mime
View raw message