RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist
Weibing Xiao
duke at openjdk.org
Wed Sep 7 15:20:34 UTC 2022
On Wed, 24 Aug 2022 04:42:54 GMT, David Schlosnagle <duke at openjdk.org> wrote:
>> 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist
>
> src/java.base/share/classes/java/io/File.java line 2180:
>
>> 2178:
>> 2179:
>> 2180: if(!tmpdir.exists() || !tmpdir.canWrite()) {
>
> Should this check that `tmpdir.isDirectory()` that will do both existence & directory check? That would catch if java.io.t odor was mistakenly set to an existing (writable) file.
>
> Suggestion:
>
> if(!tmpdir.isDirectory() || !tmpdir.canWrite()) {
Using a new approach, please check the new commits. Thanks.
-------------
PR: https://git.openjdk.org/jdk/pull/9989
More information about the core-libs-dev
mailing list