Skip to content

Commit b9cabbe

Browse files
author
Brian Burkhalter
committed
8341997: Tests create files in src tree instead of scratch dir
Reviewed-by: erikj, jpai
1 parent 5eae20f commit b9cabbe

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

test/jdk/java/io/FileInputStream/ReadXBytes.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -45,7 +45,7 @@ public class ReadXBytes {
4545
private static final Random RND = RandomFactory.getRandom();
4646

4747
public static void main(String args[]) throws IOException {
48-
File dir = new File(System.getProperty("test.src", "."));
48+
File dir = new File(".");
4949
dir.deleteOnExit();
5050

5151
File empty = File.createTempFile("foo", "bar", dir);

test/jdk/java/nio/MappedByteBuffer/ForceException.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -40,7 +40,7 @@ public static void main(String[] args) throws IOException {
4040
int numberOfBlocks = 200;
4141
int fileLength = numberOfBlocks * blockSize;
4242

43-
File file = new File(System.getProperty("test.src", "."), "test.dat");
43+
File file = new File(".", "test.dat");
4444
file.deleteOnExit();
4545
try (RandomAccessFile raf = new RandomAccessFile(file, "rw")) {
4646
raf.setLength(fileLength);

test/jdk/java/nio/MappedByteBuffer/ForceViews.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2021, 2024, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -51,7 +51,7 @@ static record Segment(int position, int length) {}
5151

5252
@BeforeTest(alwaysRun=true)
5353
public void openChannel() throws IOException {
54-
Path file = Path.of(System.getProperty("test.src", "."), "junk");
54+
Path file = Path.of(".", "junk");
5555
fc = FileChannel.open(file, CREATE_NEW, READ, WRITE, DELETE_ON_CLOSE);
5656
ByteBuffer buf = ByteBuffer.wrap(new byte[1024]);
5757
fc.write(buf);

0 commit comments

Comments
 (0)