continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wsm...@apache.org
Subject svn commit: r697637 - in /continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum: execution/maven/m2/DefaultMavenBuilderHelper.java project/builder/maven/MavenTwoContinuumProjectBuilder.java
Date Sun, 21 Sep 2008 23:25:20 GMT
Author: wsmoak
Date: Sun Sep 21 16:25:20 2008
New Revision: 697637

URL: http://svn.apache.org/viewvc?rev=697637&view=rev
Log:
[CONTINUUM-1721] Guard against NPE from now-optional scm element.  Note duplicate code.

Modified:
    continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
    continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java

Modified: continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java?rev=697637&r1=697636&r2=697637&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
(original)
+++ continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/execution/maven/m2/DefaultMavenBuilderHelper.java
Sun Sep 21 16:25:20 2008
@@ -156,8 +156,9 @@
             String scmUrl = getScmUrl( mavenProject );
 
             continuumProject.setScmUrl( scmUrl );
-
-            if ( !"HEAD".equals( mavenProject.getScm().getTag() ) )
+          
+            //TODO:  This code is duplicated in MavenTwoContinuumProjectBuilder
+            if ( mavenProject.getScm() != null && "HEAD".equals( mavenProject.getScm().getTag()
) )
             {
                 continuumProject.setScmTag( mavenProject.getScm().getTag() );
             }

Modified: continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
URL: http://svn.apache.org/viewvc/continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java?rev=697637&r1=697636&r2=697637&view=diff
==============================================================================
--- continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
(original)
+++ continuum/branches/CONTINUUM-1721/continuum-core/src/main/java/org/apache/maven/continuum/project/builder/maven/MavenTwoContinuumProjectBuilder.java
Sun Sep 21 16:25:20 2008
@@ -300,7 +300,8 @@
                 scmUrl = continuumProject.getScmUrl();
             }
 
-            if ( !"HEAD".equals( mavenProject.getScm().getTag() ) )
+            //TODO:  This code is duplicated in DefaultMavenBuilderHelper
+            if ( mavenProject.getScm() != null && "HEAD".equals( mavenProject.getScm().getTag()
) )            
             {
                 continuumProject.setScmTag( mavenProject.getScm().getTag() );
             }



Mime
View raw message