fixed tons of null pointers after loading objects from db

This commit is contained in:
Light2
2014-05-04 22:47:05 +02:00
parent a4216f76b5
commit ae33de15c5
17 changed files with 71 additions and 36 deletions
+5 -1
View File
@@ -63,7 +63,7 @@ public class SWGMultiMap<K, V> implements Multimap<K, V>, Serializable {
private byte viewType;
private short updateType;
@NotPersistent
protected transient final Object objectMutex = new Object();
protected transient Object objectMutex = new Object();
public SWGMultiMap() { }
@@ -83,6 +83,10 @@ public class SWGMultiMap<K, V> implements Multimap<K, V>, Serializable {
}
}
public void init() {
objectMutex = new Object();
}
public Map<K, Collection<V>> asMap() {
synchronized(objectMutex) {
return map.asMap();