RFR: 6426678: (spec) File.createTempFile(prefix, suffix, dir) needs clarification for illegal symbols in suffix

Alan Bateman alanb at openjdk.org
Fri Aug 2 08:47:31 UTC 2024


On Fri, 2 Aug 2024 00:21:28 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:

> Add some verbiage indicating that an `IOException` will be thrown if a file with a name generated from the supplied prefix and suffix according to the described algorithm cannot be generated by the underlying system, whether that be due to the presence of one of more characters not supported by the underlying system or for some other reason.

src/java.base/share/classes/java/io/File.java line 2120:

> 2118:      * prefix, five or more internally-generated characters, and the suffix.
> 2119:      *
> 2120:      * <p> If a file having the generated name cannot be created by the

I think it might be clear to say "with the generated name".

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20435#discussion_r1701515512


More information about the core-libs-dev mailing list