[jdk21u-dev] RFR: 8259637: java.io.File.getCanonicalPath() returns different values for same path

Vishal Chand duke at openjdk.org
Tue Nov 11 20:01:37 UTC 2025


Backporting:

8259637 - java.io.File.getCanonicalPath() returns different values for same path. 

* Unclean backport due to conflicts in test/jdk/java/io/File/GetCanonicalPath.java.
* The original changes depend on [8287843](https://github.com/openjdk/jdk/commit/12fce4b715f2c8b0091f5c229fcc3e3707290489#diff-747a8b3c690f75c5968683deeb27842c740a2321657d4e48fa0d317a345a1954) which introduces Windows-specific modifications that are too risky to backport without proper testing setup.

Changes applied:
- Cherry-picked `goodPathsUnix` test case from original commit.
- Updated the existing testcase to use `JUnit annotations` for execution of both the test cases.

Testing:
- Local run of jtreg1 is clean.
- Sensitivity testing - `goodPathsUnix` test-case fails before the fix and passes after the fix.

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

Commit messages:
 - Backport b98d13fc3c7f6747d9201eb884cf9d3181671ccb

Changes: https://git.openjdk.org/jdk21u-dev/pull/2457/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk21u-dev&pr=2457&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8259637
  Stats: 45 lines in 2 files changed: 35 ins; 2 del; 8 mod
  Patch: https://git.openjdk.org/jdk21u-dev/pull/2457.diff
  Fetch: git fetch https://git.openjdk.org/jdk21u-dev.git pull/2457/head:pull/2457

PR: https://git.openjdk.org/jdk21u-dev/pull/2457


More information about the jdk-updates-dev mailing list