geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1024507 - /geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
Date Wed, 20 Oct 2010 03:01:10 GMT
Author: rwonly
Date: Wed Oct 20 03:01:10 2010
New Revision: 1024507

URL: http://svn.apache.org/viewvc?rev=1024507&view=rev
Log:
GERONIMO-5607 add warning message

Modified:
    geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java

Modified: geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java?rev=1024507&r1=1024506&r2=1024507&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-security/src/main/java/org/apache/geronimo/security/keystore/FileKeystoreManager.java
Wed Oct 20 03:01:10 2010
@@ -99,9 +99,11 @@ public class FileKeystoreManager impleme
         }
         directory = new File(rootURI);
         if (!directory.exists()) {
-        	directory.mkdirs();
+        	if (directory.mkdirs()) {
+        		log.warn("The keystore directory: " + directory.getAbsolutePath() + " does not
exist. System automatically created one.");
+        	}
         }       	
-        if (!directory.isDirectory() || !directory.canRead()) {
+        if (!directory.exists() || !directory.isDirectory() || !directory.canRead()) {
             throw new IllegalStateException("FileKeystoreManager must have a root that's
a valid readable directory (not " + directory.getAbsolutePath() + ")");
         }
         log.debug("Keystore directory is " + directory.getAbsolutePath());



Mime
View raw message