Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

Removed unnecessary synchronization lock from serverSwitch constructor

lucciomand5f44ea2169e
diff --git a/source/net/yacy/server/serverSwitch.java b/source/net/yacy/server/serverSwitch.java
index eae42215b..69fabc3e0 100644
--- a/source/net/yacy/server/serverSwitch.java
+++ b/source/net/yacy/server/serverSwitch.java
@@ -113,26 +113,24 @@ public class serverSwitch {
// remove all values from config that do not appear in init
this.configRemoved = new ConcurrentHashMap<String, String>();
- synchronized (this.configProps) {
- Iterator<String> i = this.configProps.keySet().iterator();
- String key;
- while (i.hasNext()) {
- key = i.next();
- if (!(initProps.containsKey(key))) {
- this.configRemoved.put(key, this.configProps.get(key));
- i.remove();
- }
+ Iterator<String> i = this.configProps.keySet().iterator();
+ String key;
+ while (i.hasNext()) {
+ key = i.next();
+ if (!(initProps.containsKey(key))) {
+ this.configRemoved.put(key, this.configProps.get(key));
+ i.remove();
}
+ }
- // merge new props from init to config
- // this is necessary for migration, when new properties are attached
- initProps.putAll(this.configProps);
- this.configProps = initProps;
+ // merge new props from init to config
+ // this is necessary for migration, when new properties are attached
+ initProps.putAll(this.configProps);
+ this.configProps = initProps;
- // save result; this may initially create a config file after
- // initialization
- saveConfig();
- }
+ // save result; this may initially create a config file after
+ // initialization
+ saveConfig();
// init thread control
this.workerThreads = new TreeMap<String, BusyThread>();