8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist

Reviewed-by: rriggs, naoto, coffeys
This commit is contained in:
Weibing Xiao 2022-11-23 17:10:05 +00:00 committed by Sean Coffey
parent 086763a629
commit 8df3bc4ec5
4 changed files with 140 additions and 4 deletions

View file

@ -2244,6 +2244,12 @@ public final class System {
// SecurityManager
Unsafe.getUnsafe().ensureClassInitialized(StringConcatFactory.class);
// Emit a warning if java.io.tmpdir is set via the command line
// to a directory that doesn't exist
if (SystemProps.isBadIoTmpdir()) {
System.err.println("WARNING: java.io.tmpdir directory does not exist");
}
String smProp = System.getProperty("java.security.manager");
boolean needWarning = false;
if (smProp != null) {