RFR: 8370216: Fix of new File("").exists() causes undefined behavior in libraries
Brian Burkhalter
bpb at openjdk.org
Tue Jan 6 17:04:49 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 storey (_sic_) has moved on since the PR was created. I assume we will need to update the File class description to allow this.
Sorry, but I don't understand this comment.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/28158#issuecomment-3715511954
More information about the core-libs-dev
mailing list