RFR: 8284930: Re-examine FilterInputStream mark/reset
Jaikiran Pai
jpai at openjdk.java.net
Wed Apr 20 12:01:23 UTC 2022
On Wed, 20 Apr 2022 07:33:14 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> I wonder if it should be removed from InputStream at the same time.
Interesting. I hadn't noticed `InputStream` had those two methods synchronized. I suspect removing synchronization from those two methods on `InputStream` is probably a lot more "simpler" (i.e. shouldn't impact any other code) since the `mark` was an empty implementation and `reset` throws an `IOException` stating mark/reset isn't supported. So if any subclasses of `InputStream` did indeed rely on mark/reset capability, then they would have already overridden these methods and dealt with any necessary synchronization themselves in those methods. So removing `synchronized` from these two methods in `InputStream`, I think is a good idea.
As for the changes to `FilterInputStream`, would this change require a CSR?
-------------
PR: https://git.openjdk.java.net/jdk/pull/8309
More information about the core-libs-dev
mailing list