continuum-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r487511 - in /maven/continuum/trunk: continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
Date Fri, 15 Dec 2006 10:26:02 GMT
Author: evenisse
Date: Fri Dec 15 02:26:01 2006
New Revision: 487511

URL: http://svn.apache.org/viewvc?view=rev&rev=487511
Log:
[CONTINUUM-1057] Fix possible NPE

Modified:
    maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
    maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java

Modified: maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java?view=diff&rev=487511&r1=487510&r2=487511
==============================================================================
--- maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
(original)
+++ maven/continuum/trunk/continuum-core/src/main/java/org/apache/maven/continuum/configuration/DefaultConfigurationService.java
Fri Dec 15 02:26:01 2006
@@ -192,6 +192,11 @@
 
     public File getFile( String filename )
     {
+        if ( filename == null )
+        {
+            return null;
+        }
+
         File f = null;
 
         if ( filename != null && filename.length() != 0 )

Modified: maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
URL: http://svn.apache.org/viewvc/maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java?view=diff&rev=487511&r1=487510&r2=487511
==============================================================================
--- maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
(original)
+++ maven/continuum/trunk/continuum-webapp/src/main/java/org/apache/maven/continuum/web/action/admin/ConfigurationAction.java
Fri Dec 15 02:26:01 2006
@@ -61,11 +61,23 @@
     {
         ConfigurationService configuration = getContinuum().getConfiguration();
 
-        workingDirectory = configuration.getWorkingDirectory().getAbsolutePath();
+        File workingDirectoryFile = configuration.getWorkingDirectory();
+        if ( workingDirectoryFile != null )
+        {
+            workingDirectory = workingDirectoryFile.getAbsolutePath();
+        }
 
-        buildOutputDirectory = configuration.getBuildOutputDirectory().getAbsolutePath();
+        File buildOutputDirectoryFile = configuration.getBuildOutputDirectory();
+        if ( buildOutputDirectoryFile != null )
+        {
+            buildOutputDirectory = buildOutputDirectoryFile.getAbsolutePath();
+        }
 
-        deploymentRepositoryDirectory = configuration.getDeploymentRepositoryDirectory().getAbsolutePath();
+        File deploymentRepositoryDirectoryFile = configuration.getDeploymentRepositoryDirectory();
+        if ( deploymentRepositoryDirectoryFile != null )
+        {
+            deploymentRepositoryDirectory = deploymentRepositoryDirectoryFile.getAbsolutePath();
+        }
 
         baseUrl = configuration.getUrl();
 



Mime
View raw message