RFR: 4847239: (spec) File.createTempFile() should make it clear that it doesn't create the temporary directory [v2]

Brian Burkhalter brian.burkhalter at oracle.com
Thu Jun 24 18:16:43 UTC 2021


On Jun 24, 2021, at 3:29 AM, Lance Andersen <lancea at openjdk.java.net<mailto:lancea at openjdk.java.net>> wrote:

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

2114:      * abstract pathname is valid and denotes an existing directory, then the
2115:      * file will be created in that directory; otherwise, the file will not
2116:      * be created and an {@code IOException} will be thrown.  In no case will

I might suggest  reworking the 1st sentence as it is a tad long and we could probably reduce the 'then' usages.

Maybe instead of "In no case..." change to  "Under no circumstances ...."

Good points, Lance. I updated the verbiage.

Should it also indicate an IOException will be thrown if the directory does not exist?

I think that this is implicit in the second sentence of the revised version.


More information about the core-libs-dev mailing list