git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1023929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2010-10-18 18:14:23 +00:00
parent b29dd0968d
commit 8f9fe40f7c
1 changed files with 4 additions and 4 deletions

View File

@ -96,12 +96,12 @@ public class DualHashBidiMap<K, V> extends AbstractDualBidiMap<K, V> implements
out.writeObject(normalMap);
}
@SuppressWarnings("unchecked")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
normalMap = new HashMap();
reverseMap = new HashMap();
Map map = (Map) in.readObject();
normalMap = new HashMap<K, V>();
reverseMap = new HashMap<V, K>();
@SuppressWarnings("unchecked") // will fail at runtime if stream is incorrect
Map<K, V> map = (Map<K, V>) in.readObject();
putAll(map);
}