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

Vishal Chand duke at openjdk.org
Fri Nov 14 15:59:19 UTC 2025


On Mon, 10 Nov 2025 20:18:03 GMT, Vishal Chand <duke at openjdk.org> wrote:

> 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.

Closing the PR due to the following feedback from `OpenJDK 21 maintainer`:

This has a compatibility impact. There might be users relying on the old behavour. JDK 25 is already out for users to use which has the fix.

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

PR Comment: https://git.openjdk.org/jdk21u-dev/pull/2457#issuecomment-3533422045


More information about the jdk-updates-dev mailing list