Author: tchemit Date: 2010-04-14 18:27:47 +0200 (Wed, 14 Apr 2010) New Revision: 1827 Log: Anomalie #516: [ApplicationConfig] user configuration file is not save + add logs Modified: trunk/src/main/java/org/nuiton/util/ApplicationConfig.java Modified: trunk/src/main/java/org/nuiton/util/ApplicationConfig.java =================================================================== --- trunk/src/main/java/org/nuiton/util/ApplicationConfig.java 2010-04-14 11:11:16 UTC (rev 1826) +++ trunk/src/main/java/org/nuiton/util/ApplicationConfig.java 2010-04-14 16:27:47 UTC (rev 1827) @@ -619,7 +619,10 @@ * @param excludeKeys optional list of keys to exclude from */ public void saveForSystem(String... excludeKeys) { - File file = new File(getConfigPath() + getConfigFileName()); + File file = new File(new File(getConfigPath()), getConfigFileName()); + if (log.isDebugEnabled()) { + log.debug("will save system configuration in " + file); + } try { save(file, false, excludeKeys); } catch (IOException eee) { @@ -637,7 +640,10 @@ * @param excludeKeys optional list of keys to exclude from */ public void saveForUser(String... excludeKeys) { - File file = new File(getUserPath() + getConfigFileName()); + File file = new File(new File(getUserPath()), getConfigFileName()); + if (log.isDebugEnabled()) { + log.debug("will save user configuration in " + file); + } try { save(file, false, excludeKeys); } catch (IOException eee) { @@ -930,11 +936,6 @@ * @param value property value */ public void setOption(String key, String value) { - //TC-20100414 special treatment when using adjusting property (internal state) - if (key.equals(ADJUSTING_PROPERTY)) { - setAdjusting(Boolean.valueOf(value)); - return; - } if (inParseOptionPhase) { line.setProperty(key, value); } else { @@ -1491,6 +1492,9 @@ // user home directory File homeConfig = new File(getUserPath(), filename); + if (log.isDebugEnabled()) { + log.debug("User configuration file : " + homeConfig); + } // don't use new File(String, String) File oldHomeConfig = new File(userPath + filename);