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

View File

@ -117,15 +117,22 @@ public class HashSetValuedHashMap<K, V> extends AbstractSetValuedMap<K, V>
return new HashSet<>(initialSetCapacity); return new HashSet<>(initialSetCapacity);
} }
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);
} }
private void writeObject(final ObjectOutputStream oos) throws IOException { private void writeObject(final ObjectOutputStream out) throws IOException {
oos.defaultWriteObject(); out.defaultWriteObject();
doWriteObject(oos); doWriteObject(out);
} }
} }