RFR: 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist [v2]
Alan Bateman
alanb at openjdk.org
Fri Sep 9 06:18:09 UTC 2022
On Thu, 8 Sep 2022 19:22:37 GMT, Weibing Xiao <duke at openjdk.org> wrote:
>> 8290313: Produce warning when user specified java.io.tmpdir directory doesn't exist
>
> Weibing Xiao has updated the pull request incrementally with one additional commit since the last revision:
>
> add the change for nio and update the code according to the comments
Is the primary motive to catch scenarios where someone provides -Djava.io.tmpdir=<baddir> on the command line? I asked this via a comment in the JBS issue last month and it would be useful to know if this is the scenario that you are interested in. If it is, then I think we should look at a warning at startup rather than delayed warning (or two warnings with the current patch).
src/java.base/share/classes/java/nio/file/TempFileHelper.java line 53:
> 51: // print out the error message for java.io.tmpdir setting
> 52: static {
> 53: if (!Files.isDirectory(tmpdir)) {
This won't work with a security manager set.
-------------
PR: https://git.openjdk.org/jdk/pull/9989
More information about the core-libs-dev
mailing list