RFR: 8343039: Remove jdk.internal.misc.InternalLock and usages from java.io [v3]
Brian Burkhalter
bpb at openjdk.org
Wed Nov 13 20:07:59 UTC 2024
On Wed, 13 Nov 2024 19:57:39 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> [...] it's good that Chen is reviewing too as would be too easy to introduce a bug with this refactor.
Definitely on both counts.
> src/java.base/share/classes/java/io/BufferedInputStream.java line 242:
>
>> 240: initialSize = size;
>> 241: if (getClass() == BufferedInputStream.class) {
>> 242: buf = EMPTY;
>
> Maybe keep "lazily create buffer when not subclassed" as the comment.
See 9417b53.
> src/java.base/share/classes/java/io/PrintWriter.java line 422:
>
>> 420: */
>> 421: public void close() {
>> 422: Object lock = this.lock;
>
> I assume L422 can be deleted.
Yep: 9417b53.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22048#issuecomment-2474663889
PR Review Comment: https://git.openjdk.org/jdk/pull/22048#discussion_r1841089672
PR Review Comment: https://git.openjdk.org/jdk/pull/22048#discussion_r1841090342
More information about the core-libs-dev
mailing list