From b868143fb118161e60013cc639716304552e3c7f Mon Sep 17 00:00:00 2001 From: Luke Taylor Date: Tue, 6 Nov 2007 22:18:13 +0000 Subject: [PATCH] Make sure "start" is called even if working directory is already set. --- .../security/config/ApacheDSContainer.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/org/springframework/security/config/ApacheDSContainer.java b/core/src/main/java/org/springframework/security/config/ApacheDSContainer.java index 8c01f7599d..7fd117d133 100644 --- a/core/src/main/java/org/springframework/security/config/ApacheDSContainer.java +++ b/core/src/main/java/org/springframework/security/config/ApacheDSContainer.java @@ -61,17 +61,15 @@ class ApacheDSContainer implements InitializingBean, DisposableBean, Lifecycle, } public void afterPropertiesSet() throws Exception { - if (workingDir != null) { - return; + if (workingDir == null) { + String apacheWorkDir = System.getProperty("apacheDSWorkDir"); + + if (apacheWorkDir == null) { + apacheWorkDir = System.getProperty("java.io.tmpdir") + File.separator + "apacheds-spring-security"; + } + + setWorkingDirectory(new File(apacheWorkDir)); } - - String apacheWorkDir = System.getProperty("apacheDSWorkDir"); - - if (apacheWorkDir == null) { - apacheWorkDir = System.getProperty("java.io.tmpdir") + File.separator + "apacheds-spring-security"; - } - - setWorkingDirectory(new File(apacheWorkDir)); start(); }