Index: lutincommandline/src/java/org/codelutin/option/Config.java diff -u lutincommandline/src/java/org/codelutin/option/Config.java:1.8 lutincommandline/src/java/org/codelutin/option/Config.java:1.9 --- lutincommandline/src/java/org/codelutin/option/Config.java:1.8 Tue Mar 18 18:16:52 2008 +++ lutincommandline/src/java/org/codelutin/option/Config.java Sat Mar 22 06:09:34 2008 @@ -118,7 +118,7 @@ loadFromSystem(); // surcharge à partir des propriétés de la jvm - loadFromJvm(); + loadFromJvm(); } protected abstract OptionKey getConfigOptionKey(); @@ -206,6 +206,7 @@ log.debug(s); } } + cleanAfterInit(); } catch (Exception e) { throw new IllegalStateException(e); } finally { @@ -213,6 +214,12 @@ } } + protected void cleanAfterInit() { + // à ce stade, la config est normale + clearModified(); + clearUnsafeData(); + } + public ConfigPropertyKey getPropertyKey(String key) { for (ConfigPropertyKey propertyKey : universe) { if (propertyKey.getKey().equalsIgnoreCase(key)) { Index: lutincommandline/src/java/org/codelutin/option/OptionKey.java diff -u lutincommandline/src/java/org/codelutin/option/OptionKey.java:1.4 lutincommandline/src/java/org/codelutin/option/OptionKey.java:1.5 --- lutincommandline/src/java/org/codelutin/option/OptionKey.java:1.4 Wed Mar 19 20:21:12 2008 +++ lutincommandline/src/java/org/codelutin/option/OptionKey.java Sat Mar 22 06:09:34 2008 @@ -117,10 +117,17 @@ * @param parser the parser used * @return the share action's instance */ + @SuppressWarnings({"unchecked"}) public A getAction(P parser) { if (action == null) { if (actionClass == null) { - throw new IllegalStateException("no concrete action found for " + abstractActionClass); + // try to acquire from same package as abstractActionClass with noAbstract factor + String fqn = abstractActionClass.getName().replace("Abstract", ""); + try { + actionClass = (Class) Class.forName(fqn); + } catch (Exception e) { + throw new IllegalStateException("no concrete action found for " + abstractActionClass); + } } try { if (actionConstructor == null) {