Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance
Java decentralizedintranet-searchintranet-search-enginep2pp2p-networkprivacyprivacy-protectionsearch-enginesearchenginewebweb-search-enginewebsearchwebseearch-engine
removed archaic migration code
Michael Peter Christenf5fd2aea1875
diff --git a/source/net/yacy/server/serverSwitch.java b/source/net/yacy/server/serverSwitch.javaindex 82321eb5e..8096d6a6c 100644--- a/source/net/yacy/server/serverSwitch.java+++ b/source/net/yacy/server/serverSwitch.java@@ -83,9 +83,7 @@ public class serverSwitch// file name of the config filethis.dataPath = dataPath;this.appPath = appPath;- this.configComment =- "This is an automatically generated file, updated by serverAbstractSwitch and initialized by "- + initPath;+ this.configComment = "This is an automatically generated file, updated by serverAbstractSwitch and initialized by " + initPath;final File initFile = new File(appPath, initPath);this.configFile = new File(dataPath, configPath); // propertiesFile(config);this.firstInit = !this.configFile.exists(); // this is true if the application was started for the first time@@ -98,20 +96,7 @@ public class serverSwitch} else {initProps = new ConcurrentHashMap<String, String>();}-- // if 'pro'-version is selected, overload standard settings with 'pro'-settings- Iterator<String> i;- String prop;-- // delete the 'pro' init settings- i = initProps.keySet().iterator();- while ( i.hasNext() ) {- prop = i.next();- if ( prop.endsWith("__pro") ) {- i.remove();- }- }-+// load config's from last saveif ( this.configFile.exists() ) {this.configProps = FileUtils.loadMap(this.configFile);@@ -122,7 +107,7 @@ public class serverSwitch// remove all values from config that do not appear in initthis.configRemoved = new ConcurrentHashMap<String, String>();synchronized ( this.configProps ) {- i = this.configProps.keySet().iterator();+ Iterator<String> i = this.configProps.keySet().iterator();String key;while ( i.hasNext() ) {key = i.next();@@ -132,17 +117,12 @@ public class serverSwitch}}- // doing a config settings migration- //HashMap migratedSettings = migrateSwitchConfigSettings((HashMap) removedProps);- //if (migratedSettings != null) configProps.putAll(migratedSettings);-// merge new props from init to config// this is necessary for migration, when new properties are attachedinitProps.putAll(this.configProps);this.configProps = initProps;- // save result; this may initially create a config file after- // initialization+ // save result; this may initially create a config file after initializationsaveConfig();}diff --git a/source/net/yacy/yacy.java b/source/net/yacy/yacy.javaindex 7f3ba5547..24ad1c2dc 100644--- a/source/net/yacy/yacy.java+++ b/source/net/yacy/yacy.java@@ -195,16 +195,9 @@ public final class yacy {lock = channel.tryLock(); // lock yacy.running} catch (final Exception e) { }- final String oldconf = "DATA/SETTINGS/httpProxy.conf".replace("/", File.separator);- final String newconf = "DATA/SETTINGS/yacy.conf".replace("/", File.separator);- final File oldconffile = new File(dataHome, oldconf);- if (oldconffile.exists()) {- final File newconfFile = new File(dataHome, newconf);- if(!oldconffile.renameTo(newconfFile))- Log.logSevere("STARTUP", "WARNING: the file " + oldconffile + " can not be renamed to "+ newconfFile +"!");- }+ final String conf = "DATA/SETTINGS/yacy.conf".replace("/", File.separator);try {- sb = new Switchboard(dataHome, appHome, "defaults/yacy.init".replace("/", File.separator), newconf);+ sb = new Switchboard(dataHome, appHome, "defaults/yacy.init".replace("/", File.separator), conf);} catch (final RuntimeException e) {Log.logSevere("STARTUP", "YaCy cannot start: " + e.getMessage(), e);System.exit(-1);