RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist
Alan Bateman
alanb at openjdk.org
Wed Sep 7 16:04:59 UTC 2022
On Tue, 23 Aug 2022 18:32:30 GMT, Weibing Xiao <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 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
More information about the core-libs-dev
mailing list