RFR: 8370216: Fix of new File("").exists() causes undefined behavior in libraries

Alan Bateman alanb at openjdk.org
Tue Jan 6 06:13:24 UTC 2026


On Wed, 5 Nov 2025 18:14:44 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Add a system property, `jdk.io.File.failIfEmptyPath`, which when `true` reverts to legacy, pre-JDK 25 behavior, as to how `java.io.File` handles an empty pathname string.

The store has moved on since the PR was created. I assume we will need to update the File class description to allow this.

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

Changes requested by alanb (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/28158#pullrequestreview-3629547682


More information about the core-libs-dev mailing list