This patch overrides toString() in FileInputStream, FileOutputStream, and RandomAccessFile to return the file's base name followed by its identity hash. It follows similar changes made a few years ago for ZipFile (JDK-8319626).
Filename retrieval shares the existing File.getName() logic, while streams constructed from a file descriptor retain their previous behaviour. --------- - [X] I confirm that I make this contribution in accordance with the [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). ------------- Commit messages: - 8385144 Changes: https://git.openjdk.org/jdk/pull/34137/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=34137&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8385144 Stats: 105 lines in 5 files changed: 104 ins; 0 del; 1 mod Patch: https://git.openjdk.org/jdk/pull/34137.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/34137/head:pull/34137 PR: https://git.openjdk.org/jdk/pull/34137
