Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
File relativeFile1 = new File("abc.txt"); System.setProperty("user.dir", "/somewhereElse"); File relativeFile2 = new File("abc.txt"); System.out.println(relativeFile1.getAbsolutePath()); System.out.println(relativeFile2.getAbsolutePath());
pre jdk11, the code above will print out "/somewhereElse/abc.txt" in both lines, even though the relativeFile objects still point to the files under the old user.dir. But in jdk11, the above code will print out "old user.dir/abc.txt" in both lines.
dynamically change user.dir would not affect the relative file's absolute path anymore.
Attachments
Issue Links
- is related to
-
GEODE-5903 repeat*Test tasks are not forked with every repetition.
- Resolved
- links to