Skip to content

Commit

Permalink
Remove unused writeObject method.
Browse files Browse the repository at this point in the history
`MonitorBasedPriorityBlockingQueue` hasn't been `Serializable` since cl/42749026 (when I perhaps discovered that serialization didn't actually work?).

RELNOTES=n/a
PiperOrigin-RevId: 641359463
  • Loading branch information
cpovirk authored and Google Java Core Libraries committed Jun 7, 2024
1 parent 0d37269 commit d328b51
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -552,19 +552,4 @@ public void remove() {
}
}
}

/**
* Saves the state to a stream (that is, serializes it). This merely wraps default serialization
* within the monitor. The serialization strategy for items is left to underlying Queue. Note that
* locking is not needed on deserialization, so readObject is not defined, just relying on
* default.
*/
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
monitor.enter();
try {
s.defaultWriteObject();
} finally {
monitor.leave();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -552,19 +552,4 @@ public void remove() {
}
}
}

/**
* Saves the state to a stream (that is, serializes it). This merely wraps default serialization
* within the monitor. The serialization strategy for items is left to underlying Queue. Note that
* locking is not needed on deserialization, so readObject is not defined, just relying on
* default.
*/
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
monitor.enter();
try {
s.defaultWriteObject();
} finally {
monitor.leave();
}
}
}

0 comments on commit d328b51

Please sign in to comment.