Generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1023929 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b29dd0968d
commit
8f9fe40f7c
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue