Generics
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@1023961 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d4c9c2c7bf
commit
bf15307ea1
|
@ -383,12 +383,12 @@ public class DualTreeBidiMap<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 TreeMap(comparator);
|
normalMap = new TreeMap<K, V>(comparator);
|
||||||
reverseMap = new TreeMap(valueComparator);
|
reverseMap = new TreeMap<V, K>(valueComparator);
|
||||||
Map map = (Map) in.readObject();
|
@SuppressWarnings("unchecked") // will fail at runtime if the stream is incorrect
|
||||||
|
Map<K, V> map = (Map<K, V>) in.readObject();
|
||||||
putAll(map);
|
putAll(map);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue