RFR: 8285745: Re-examine PushbackInputStream mark/reset
Jaikiran Pai
jpai at openjdk.java.net
Thu Apr 28 03:10:37 UTC 2022
On Wed, 27 Apr 2022 20:10:03 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Please review this request to remove the `synchronized` keyword from the `mark(int)` and `reset()` methods of `java.io.PushbackInputStream`.
Looks fine to me.
Given that `mark()` currently is a no-op and `reset()` throws an exception, the `synchronized` wouldn't be doing anything when it comes to calls on an exact instance of `PushbackInputStream`.
Calls on subclasses of `PushbackInputStream` which did support mark/reset, would be overriding this method already and handling any synchronization themselves.
-------------
Marked as reviewed by jpai (Committer).
PR: https://git.openjdk.java.net/jdk/pull/8433
More information about the core-libs-dev
mailing list