RFR: 4799358: BufferOutputStream.write() should immediately throw IOException on closed stream [v2]
Vyom Tewari
vtewari at openjdk.org
Thu Aug 24 08:15:29 UTC 2023
On Wed, 23 Aug 2023 21:41:41 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Vyom Tewari has updated the pull request incrementally with one additional commit since the last revision:
>>
>> make the isOpen method to package private
>
> src/java.base/share/classes/java/io/FilterOutputStream.java line 210:
>
>> 208: */
>> 209: boolean isOpen(){
>> 210: return !closed;
>
> Wouldn't you want `synchronized (closeLock)` here?
'closed' is volatile, we don't need synchronized (closeLock) here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15361#discussion_r1303968655
More information about the core-libs-dev
mailing list