This commit is contained in:
Gary Gregory 2024-06-23 16:06:02 -04:00
parent 50cdd26c00
commit 5121479f39
1 changed files with 13 additions and 6 deletions

View File

@ -118,10 +118,17 @@ public class ArrayListValuedHashMap<K, V> extends AbstractListValuedMap<K, V>
return new ArrayList<>(initialListCapacity); return new ArrayList<>(initialListCapacity);
} }
private void readObject(final ObjectInputStream ois) throws IOException, ClassNotFoundException { /**
ois.defaultReadObject(); * Deserializes an instance from an ObjectInputStream.
*
* @param in The source ObjectInputStream.
* @throws IOException Any of the usual Input/Output related exceptions.
* @throws ClassNotFoundException A class of a serialized object cannot be found.
*/
private void readObject(final ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
setMap(new HashMap<>()); setMap(new HashMap<>());
doReadObject(ois); doReadObject(in);
} }
/** /**
@ -134,9 +141,9 @@ public class ArrayListValuedHashMap<K, V> extends AbstractListValuedMap<K, V>
} }
} }
private void writeObject(final ObjectOutputStream oos) throws IOException { private void writeObject(final ObjectOutputStream out) throws IOException {
oos.defaultWriteObject(); out.defaultWriteObject();
doWriteObject(oos); doWriteObject(out);
} }
} }