continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r586422 - /maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
Date Fri, 19 Oct 2007 13:12:51 GMT
Author: evenisse
Date: Fri Oct 19 06:12:50 2007
New Revision: 586422

URL: http://svn.apache.org/viewvc?rev=586422&view=rev
Log:
[CONTINUUM-1527] Fix NPE when Releasing without <configuration> node in the maven-release-plugin
Submitted by: Yudong Wang

Modified:
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java?rev=586422&r1=586421&r2=586422&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/ReleasePrepareAction.java
Fri Oct 19 06:12:50 2007
@@ -99,8 +99,8 @@
         scmUsername = project.getScmUsername();
         scmPassword = project.getScmPassword();
         scmTag = project.getScmTag();
-        String workingDirectory = getContinuum().getWorkingDirectory(project.getId()).getPath();
-        
+        String workingDirectory = getContinuum().getWorkingDirectory( project.getId() ).getPath();
+
         String scmUrl = project.getScmUrl();
         if ( scmUrl.startsWith( SCM_SVN_PROTOCOL_PREFIX ) )
         {
@@ -139,28 +139,31 @@
                 {
                     Xpp3Dom dom = (Xpp3Dom) plugin.getConfiguration();
 
-                    Xpp3Dom configuration = dom.getChild( "releaseLabel" );
-                    if ( configuration != null )
-                    {
-                        scmTag = configuration.getValue();
-                    }
-
-                    configuration = dom.getChild( "tag" );
-                    if ( configuration != null )
-                    {
-                        scmTag = configuration.getValue();
-                    }
-
-                    configuration = dom.getChild( "tagBase" );
-                    if ( configuration != null )
-                    {
-                        scmTagBase = configuration.getValue();
-                    }
-
-                    configuration = dom.getChild( "preparationGoals" );
-                    if ( configuration != null )
+                    if ( dom != null )
                     {
-                        prepareGoals = configuration.getValue();
+                        Xpp3Dom configuration = dom.getChild( "releaseLabel" );
+                        if ( configuration != null )
+                        {
+                            scmTag = configuration.getValue();
+                        }
+
+                        configuration = dom.getChild( "tag" );
+                        if ( configuration != null )
+                        {
+                            scmTag = configuration.getValue();
+                        }
+
+                        configuration = dom.getChild( "tagBase" );
+                        if ( configuration != null )
+                        {
+                            scmTagBase = configuration.getValue();
+                        }
+
+                        configuration = dom.getChild( "preparationGoals" );
+                        if ( configuration != null )
+                        {
+                            prepareGoals = configuration.getValue();
+                        }
                     }
                 }
             }



Mime
View raw message