diff options
author | snowleo <schneeleo@gmail.com> | 2012-09-10 19:06:17 +0200 |
---|---|---|
committer | snowleo <schneeleo@gmail.com> | 2012-09-10 19:06:17 +0200 |
commit | 736a6d273abb000c81b17d0142ce358d2225f873 (patch) | |
tree | 1c27aa1f8656f13903415da23e6cf857acd1f4d4 /EssentialsGroupManager/src | |
parent | 71179e3dfd4ed8668fd4096d15326613c4a05750 (diff) | |
download | Essentials-736a6d273abb000c81b17d0142ce358d2225f873.tar Essentials-736a6d273abb000c81b17d0142ce358d2225f873.tar.gz Essentials-736a6d273abb000c81b17d0142ce358d2225f873.tar.lz Essentials-736a6d273abb000c81b17d0142ce358d2225f873.tar.xz Essentials-736a6d273abb000c81b17d0142ce358d2225f873.zip |
Revert bad synchronization
This reverts commit 96ab1b4533b62464b8325373e677209290bced3e.
Diffstat (limited to 'EssentialsGroupManager/src')
4 files changed, 11 insertions, 15 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt index 5c1ea2cd2..5b409d773 100644 --- a/EssentialsGroupManager/src/Changelog.txt +++ b/EssentialsGroupManager/src/Changelog.txt @@ -196,5 +196,4 @@ v 2.0: - Fix an error with Logging set to 'OFF' triggering a cast exception.
- No more null errors from corrupt config.yml's.
- Give a better error when a subgroup is null.
- - Include the GM version when logging errors.
- - Change to Hashtables to reduce the chance of a ConcurrentModificationException pulling group/user data in an Async thread.
\ No newline at end of file + - Include the GM version when logging errors.
\ No newline at end of file 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<String, Group> groups = new Hashtable<String, Group>();
+ private Map<String, Group> groups = new HashMap<String, Group>();
/**
* Constructor
@@ -69,7 +69,7 @@ public class GroupsDataHolder { */
public void setGroups(Map<String, Group> groups) {
- this.groups = (Hashtable<String, Group>) 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<String, User> users = new Hashtable<String, User>();
+ private Map<String, User> users = new HashMap<String, User>();
/**
* Constructor
@@ -53,7 +53,7 @@ public class UsersDataHolder { */
public void setUsers(Map<String, User> users) {
- this.users = (Hashtable<String, User>) 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<String, OverloadedWorldHolder> worldsData = new Hashtable<String, OverloadedWorldHolder>(); + private Map<String, OverloadedWorldHolder> worldsData = new HashMap<String, OverloadedWorldHolder>(); /** * Map of mirrors: <nonExistingWorldName, existingAndLoadedWorldName> @@ -62,7 +61,7 @@ public class WorldsHolder { public void resetWorldsHolder() { - worldsData = new Hashtable<String, OverloadedWorldHolder>(); + worldsData = new HashMap<String, OverloadedWorldHolder>(); mirrorsGroup = new HashMap<String, String>(); mirrorsUser = new HashMap<String, String>(); @@ -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; |