continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r264766 - /maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Date Tue, 30 Aug 2005 12:14:20 GMT
Author: evenisse
Date: Tue Aug 30 05:14:17 2005
New Revision: 264766

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

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
URL: http://svn.apache.org/viewcvs/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java?rev=264766&r1=264765&r2=264766&view=diff
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/buildcontroller/DefaultBuildController.java
Tue Aug 30 05:14:17 2005
@@ -236,25 +236,36 @@
     private String convertScmResultToError( ScmResult result )
     {
         String error = "";
-        if ( result.getProviderMessage() != null )
+
+        if ( scmResult == null )
         {
-            error = "Provider message: " + StringUtils.clean( result.getProviderMessage()
) +
-                System.getProperty( "line.separator" );
+            error = "Scm result is null.";
         }
-        if ( result.getCommandOutput() != null )
+        else
         {
-            error += "Command output: " + System.getProperty( "line.separator" );
-            error += "-------------------------------------------------------------------------------"
+
-                System.getProperty( "line.separator" );
-            error += StringUtils.clean( result.getCommandOutput() ) + System.getProperty(
"line.separator" );
-            error += "-------------------------------------------------------------------------------"
+
-                System.getProperty( "line.separator" );
-        }
-        if ( result.getException() != null )
-        {
-            error += "Exception:" + System.getProperty( "line.separator" );
-            error += result.getException();
+            if ( result.getProviderMessage() != null )
+            {
+                error = "Provider message: " + StringUtils.clean( result.getProviderMessage()
) +
+                    System.getProperty( "line.separator" );
+            }
+
+            if ( result.getCommandOutput() != null )
+            {
+                error += "Command output: " + System.getProperty( "line.separator" );
+                error += "-------------------------------------------------------------------------------"
+
+                    System.getProperty( "line.separator" );
+                error += StringUtils.clean( result.getCommandOutput() ) + System.getProperty(
"line.separator" );
+                error += "-------------------------------------------------------------------------------"
+
+                    System.getProperty( "line.separator" );
+            }
+
+            if ( result.getException() != null )
+            {
+                error += "Exception:" + System.getProperty( "line.separator" );
+                error += result.getException();
+            }
         }
+
         return error;
     }
 



Mime
View raw message