archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From eveni...@apache.org
Subject svn commit: r497811 - /maven/archiva/trunk/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java
Date Fri, 19 Jan 2007 13:43:51 GMT
Author: evenisse
Date: Fri Jan 19 05:43:50 2007
New Revision: 497811

URL: http://svn.apache.org/viewvc?view=rev&rev=497811
Log:
Fix NPE when file is a root file

Modified:
    maven/archiva/trunk/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java

Modified: maven/archiva/trunk/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java
URL: http://svn.apache.org/viewvc/maven/archiva/trunk/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java?view=diff&rev=497811&r1=497810&r2=497811
==============================================================================
--- maven/archiva/trunk/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java
(original)
+++ maven/archiva/trunk/archiva-configuration/src/main/java/org/apache/maven/archiva/configuration/DefaultConfigurationStore.java
Fri Jan 19 05:43:50 2007
@@ -158,7 +158,11 @@
         FileWriter fileWriter = null;
         try
         {
-            file.getParentFile().mkdirs();
+            //does file directory exist ?
+            if ( file.getParentFile() != null && !file.getParentFile().exists() )
+            {
+                file.getParentFile().mkdirs();
+            }
 
             fileWriter = new FileWriter( file );
             writer.write( fileWriter, configuration );



Mime
View raw message