On Tue, 23 Aug 2022 18:32:30 GMT, Weibing Xiao <d...@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 1992:

> 1990: 
> 1991:         // print out the error message for java.io.tmpdir setting
> 1992:         static {

This will only run when java.io.File.createTempFile is used. So it work won't 
work java.nio.files.Files.createTempXXX. Have you looked into testing the value 
of java.io.tmpdir at startup when it is specified on the command line?

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

> 1993:             if (tmpdir.isInvalid() || !fs.hasBooleanAttributes(tmpdir, 
> FileSystem.BA_DIRECTORY)) {
> 1994:                 String msg = "WARNING: java.io.tmpdir location does not 
> exist";
> 1995:                 if 
> (SecurityProperties.includedInExceptions("fileInfo")) {

The security property controls is for exception messages, not warnings to 
System.err.

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

PR: https://git.openjdk.org/jdk/pull/9989

Reply via email to