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);
|
out.writeObject(normalMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
|
||||||
in.defaultReadObject();
|
in.defaultReadObject();
|
||||||
normalMap = new HashMap();
|
normalMap = new HashMap<K, V>();
|
||||||
reverseMap = new HashMap();
|
reverseMap = new HashMap<V, K>();
|
||||||
Map map = (Map) in.readObject();
|
@SuppressWarnings("unchecked") // will fail at runtime if stream is incorrect
|
||||||
|
Map<K, V> map = (Map<K, V>) in.readObject();
|
||||||
putAll(map);
|
putAll(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue