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

View File

@ -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);
} }