incubator-kalumet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject svn commit: r1348121 - /incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java
Date Fri, 08 Jun 2012 15:40:03 GMT
Author: jbonofre
Date: Fri Jun  8 15:40:02 2012
New Revision: 1348121

URL: http://svn.apache.org/viewvc?rev=1348121&view=rev
Log:
[KALUMET-38] Fix the location of the environment journals

Modified:
    incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java

Modified: incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java
URL: http://svn.apache.org/viewvc/incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java?rev=1348121&r1=1348120&r2=1348121&view=diff
==============================================================================
--- incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java
(original)
+++ incubator/kalumet/trunk/console/src/main/java/org/apache/kalumet/console/configuration/ConfigurationManager.java
Fri Jun  8 15:40:02 2012
@@ -174,15 +174,14 @@ public class ConfigurationManager
       throw new IllegalArgumentException(
         "The property JournalsLocation is not found in the Apache Kalumet Console configuration.
This property is required to store the environment journals and must contain the directory
path for the journal files." );
     }
-    File journalDir = new File( kalumetConsoleProperty.getValue() );
-    journalDir.mkdirs();
-    if ( System.getProperty( "kalumet.home" ) != null )
-    {
-      return System.getProperty( "kalumet.home" ) + "/" + kalumetConsoleProperty.getValue()
+ "/" + environment
-        + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION;
-    }
-    return kalumetConsoleProperty.getValue() + "/" + environment
-      + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION;
+    String journalPath;
+    if (System.getProperty( "kalumet.home" ) != null)
+      journalPath = System.getProperty( "kalumet.home" ) + "/" + kalumetConsoleProperty.getValue()
+ "/" + environment + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION;
+    else journalPath = kalumetConsoleProperty.getValue() + "/" + environment + ConfigurationManager.ENVIRONMENT_JOURNAL_FILE_EXTENSION;
+
+    File journalDir = new File( journalPath );
+    journalDir.getParentFile().mkdirs();
+    return journalPath;
   }
 
   /**



Mime
View raw message