RFR: 4799358: BufferOutputStream.write() should immediately throw IOExcept on closed stream [v2]

Lance Andersen lancea at openjdk.org
Wed Aug 23 22:13:39 UTC 2023


On Wed, 23 Aug 2023 21:46:34 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
>
> test/jdk/java/io/BufferedOutputStream/WriteAfterClose.java line 61:
> 
>> 59:     public static void main(String argv[]) throws IOException {
>> 60:         var file = new File(System.getProperty("test.dir", "."), "test.txt");
>> 61:         file.createNewFile();
> 
> Why not instead do something like?:
> 
> var dir = new File(System.getProperty("test.dir", "."));
> File file = File.createTempFile("x", "y", dir);

I don't think you need to specify `test.dir`

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/15361#discussion_r1303590880


More information about the core-libs-dev mailing list