Author: echatellier Date: 2009-10-19 14:44:59 +0200 (Mon, 19 Oct 2009) New Revision: 1688 Modified: trunk/changelog.txt trunk/src/main/java/org/nuiton/util/ApplicationConfig.java Log: Force application configuration properties to be written sorted Modified: trunk/changelog.txt =================================================================== --- trunk/changelog.txt 2009-10-11 11:27:27 UTC (rev 1687) +++ trunk/changelog.txt 2009-10-19 12:44:59 UTC (rev 1688) @@ -1,5 +1,6 @@ 1.1.2 xxx 200910xx + * [FEATURE] Force application configuration properties to be written sorted * [FEATURE] Add sed and grep method on FileUtil -- Modified: trunk/src/main/java/org/nuiton/util/ApplicationConfig.java =================================================================== --- trunk/src/main/java/org/nuiton/util/ApplicationConfig.java 2009-10-11 11:27:27 UTC (rev 1687) +++ trunk/src/main/java/org/nuiton/util/ApplicationConfig.java 2009-10-19 12:44:59 UTC (rev 1688) @@ -416,7 +416,10 @@ * @throws IOException if IO pb */ public void save(File file, boolean forceAll, String... excludeKeys) throws IOException { - Properties prop = new Properties(); + + // store sorted in file + Properties prop = new SortedProperties(); + if (forceAll) { prop.putAll(defaults); prop.putAll(classpath);