This commit is contained in:
Gary Gregory 2024-06-23 18:50:46 -04:00
parent 8044ecb310
commit 38963b1de8

View File

@ -2435,12 +2435,12 @@ public abstract class AbstractPatriciaTrie<K, V> extends AbstractBitwiseTrie<K,
* @param out the target ObjectOutputStream.
* @throws IOException thrown when an I/O errors occur writing to the target stream.
*/
private void writeObject(final ObjectOutputStream stream) throws IOException {
stream.defaultWriteObject();
stream.writeInt(this.size());
private void writeObject(final ObjectOutputStream out) throws IOException {
out.defaultWriteObject();
out.writeInt(this.size());
for (final Entry<K, V> entry : entrySet()) {
stream.writeObject(entry.getKey());
stream.writeObject(entry.getValue());
out.writeObject(entry.getKey());
out.writeObject(entry.getValue());
}
}