Author: chatellier Date: 2011-07-06 14:45:10 +0000 (Wed, 06 Jul 2011) New Revision: 3433 Log: Remove deprecated method that was renaming renamed option keys. Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java Modified: isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java =================================================================== --- isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java 2011-07-06 14:24:29 UTC (rev 3432) +++ isis-fish/trunk/src/main/java/fr/ifremer/isisfish/IsisConfig.java 2011-07-06 14:45:10 UTC (rev 3433) @@ -173,7 +173,7 @@ } static final public String COPYRIGHT_TEXT = "Version " + getVersion() + " IFREMER-MAERHA © 2000-2011"; - static final public String CONFIG_FILENAME = "isis-config-" + version.getNumber(0); + static final public String CONFIG_FILENAME = "isis-config-" + majorVersion.toString(); /** separateur de liste */ static final public String SEP = ","; @@ -884,92 +884,6 @@ return result; } - /** - * Surcharge pour la migration des options de config qui ont change de nom - * <p> - * TODO: lors du passage en version 4.0 on pourrait supprimer cette methode - * - * @param args - * @throws org.nuiton.util.ArgumentsParserException - */ - @Override - public ApplicationConfig parse(String... args) throws ArgumentsParserException { - super.parse(args); - // dans la version precedente (3.1) seul le fichier user existe, il est - // donc le seul a devoir etre modifie - boolean mustSave = false; - String[] keys = new String[]{ - "compileDirectory", Option.COMPILATION_DIRECTORY.key, - "defaultBackupDirectory", Option.BACKUP_DIRECTORY.key, - "defaultExportNames", Option.DEFAULT_EXPORT_NAMES.key, - "defaultMapFile", Option.DEFAULT_MAP_FILENAME.key, - "defaultResultNames", Option.DEFAULT_RESULT_NAMES.key, - "defaultSimulator", Option.SIMULATOR_CLASSFILE.key, - "defaultTagValue", Option.DEFAULT_TAG_VALUE.key, - "javadocURL", Option.JAVADOC_URL.key, - "locale", Option.LOCALE.key, - "simulationShowOnlyError", Option.SIMULATION_SHOW_ONLY_ERROR.key, - "simulationShowOnlyQueue", null, // Option.SIMULATION_SHOW_ONLY_QUEUE.key, - "smtpServer", Option.SMTP_SERVER.key, - "userMail", Option.USER_MAIL.key, - "userName", Option.USER_NAME.key, - "vcs.keyFile", Option.SSH_KEY_FILE.key, - "vcs.keyFile", Option.SSH_KEY_FILE.key, - "vcs.ssh.keyFile", Option.SSH_KEY_FILE.key, - "vcs.localDatabasePath", Option.DATABASE_DIRECTORY.key, - // on supprime car non compatible, les valeurs par defaut sont tres bien - "localSimulator", null, - "vcs.databaseVersion", null, - "vcs.hostName", null, - "vcs.noPassPhrase", null, - "vcs.remoteDatabase", null, - "vcs.remotePath", null, - "vcs.type", null, - "vcs.typeRepo", null, - "vcs.useSshConnexion", null, - "vcs.userName", null, - "version", null, - "projectName", null, - "simulationReportMail", null, - - }; - - if (log.isInfoEnabled()) { - log.info("Check configuration change"); - } - - for(int i=0; i<keys.length;) { - String oldKey = keys[i++]; - String newKey = keys[i++]; - if (!oldKey.equals(newKey)) { - String value = getOption(oldKey); - if (value != null) { - mustSave = true; - // quoi qu'il arrive on enleve l'ancienne cle - homefile.remove(oldKey); - if (newKey != null) { - setOption(newKey, value); - } - } - } - } - if (mustSave) { - - // FIXME EC-20100602 this save for user and configuration can be - // lost when multiple instance are launched at same time !!! - saveForUser(); - - if (log.isInfoEnabled()) { - log.info("Config file migration done"); - } - } - if (log.isDebugEnabled()) { - printConfig(); - } - - return this; - } - ////////////////////////////////////////////////// // Toutes les options disponibles //////////////////////////////////////////////////