RFR: 4799358: BufferOutputStream.write() should immediately throw IOExcept on closed stream [v2]
Brian Burkhalter
bpb at openjdk.org
Wed Aug 23 22:39:37 UTC 2023
On Wed, 23 Aug 2023 22:11:06 GMT, Lance Andersen <lancea at openjdk.org> wrote:
>> 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`
'test.dir' is not necessary, but it's a convention currently used in more than 50 IO and NIO tests. Probably not so useful here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15361#discussion_r1303604853
More information about the core-libs-dev
mailing list