Commit 508e39e2 authored by akrherz's avatar akrherz

change sync key as per @guusdk suggestion

parent ffe14c90
...@@ -215,7 +215,7 @@ public class GroupManager { ...@@ -215,7 +215,7 @@ public class GroupManager {
JID userJid = new JID(user); JID userJid = new JID(user);
if (XMPPServer.getInstance().isLocal(userJid)) { if (XMPPServer.getInstance().isLocal(userJid)) {
String username = userJid.getNode(); String username = userJid.getNode();
synchronized (username.intern()) { synchronized ((getClass().getSimpleName() + username).intern()) {
groupMetaCache.remove(username); groupMetaCache.remove(username);
} }
} }
...@@ -480,7 +480,7 @@ public class GroupManager { ...@@ -480,7 +480,7 @@ public class GroupManager {
public Collection<Group> getSharedGroups(String userName) { public Collection<Group> getSharedGroups(String userName) {
Collection<String> groupNames = (Collection<String>)groupMetaCache.get(userName); Collection<String> groupNames = (Collection<String>)groupMetaCache.get(userName);
if (groupNames == null) { if (groupNames == null) {
synchronized(userName.intern()) { synchronized((getClass().getSimpleName() + userName).intern()) {
groupNames = (Collection<String>)groupMetaCache.get(userName); groupNames = (Collection<String>)groupMetaCache.get(userName);
if (groupNames == null) { if (groupNames == null) {
// assume this is a local user // assume this is a local user
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment