From 736a6d273abb000c81b17d0142ce358d2225f873 Mon Sep 17 00:00:00 2001 From: snowleo Date: Mon, 10 Sep 2012 19:06:17 +0200 Subject: Revert bad synchronization This reverts commit 96ab1b4533b62464b8325373e677209290bced3e. --- .../anjocaido/groupmanager/dataholder/GroupsDataHolder.java | 6 +++--- .../anjocaido/groupmanager/dataholder/UsersDataHolder.java | 6 +++--- .../groupmanager/dataholder/worlds/WorldsHolder.java | 11 ++++------- 3 files changed, 10 insertions(+), 13 deletions(-) (limited to 'EssentialsGroupManager/src/org/anjocaido') diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java index ed6a985ed..eaaaace74 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/GroupsDataHolder.java @@ -1,7 +1,7 @@ package org.anjocaido.groupmanager.dataholder; import java.io.File; -import java.util.Hashtable; +import java.util.HashMap; import java.util.Map; import org.anjocaido.groupmanager.data.Group; @@ -23,7 +23,7 @@ public class GroupsDataHolder { /** * The actual groups holder */ - private Hashtable groups = new Hashtable(); + private Map groups = new HashMap(); /** * Constructor @@ -69,7 +69,7 @@ public class GroupsDataHolder { */ public void setGroups(Map groups) { - this.groups = (Hashtable) groups; + this.groups = groups; } /** diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java index 3ddc2177d..665fe227d 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/UsersDataHolder.java @@ -1,7 +1,7 @@ package org.anjocaido.groupmanager.dataholder; import java.io.File; -import java.util.Hashtable; +import java.util.HashMap; import java.util.Map; import org.anjocaido.groupmanager.data.User; @@ -22,7 +22,7 @@ public class UsersDataHolder { /** * The actual groups holder */ - private Hashtable users = new Hashtable(); + private Map users = new HashMap(); /** * Constructor @@ -53,7 +53,7 @@ public class UsersDataHolder { */ public void setUsers(Map users) { - this.users = (Hashtable) users; + this.users = users; } /** diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java index 123070759..f84262eeb 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java @@ -11,7 +11,6 @@ import java.io.InputStream; import java.util.ArrayList; import java.util.HashMap; import java.util.HashSet; -import java.util.Hashtable; import java.util.List; import java.util.Map; import java.util.Properties; @@ -34,7 +33,7 @@ public class WorldsHolder { /** * Map with instances of loaded worlds. */ - private Hashtable worldsData = new Hashtable(); + private Map worldsData = new HashMap(); /** * Map of mirrors: @@ -62,7 +61,7 @@ public class WorldsHolder { public void resetWorldsHolder() { - worldsData = new Hashtable(); + worldsData = new HashMap(); mirrorsGroup = new HashMap(); mirrorsUser = new HashMap(); @@ -403,10 +402,8 @@ public class WorldsHolder { if (worldsData.containsKey(worldNameLowered)) { OverloadedWorldHolder data = worldsData.get(worldNameLowered); - synchronized (data) { - data.updateDataSource(); - return data; - } + data.updateDataSource(); + return data; } return null; -- cgit v1.2.3