8193072: File.delete() should remove its path from DeleteOnExitHook.files

Jason Mehrens jason_mehrens at hotmail.com
Tue Jul 9 21:26:58 UTC 2019


Would the SecurityManager need to for permissions (checkWrite or some new permission) before cancelDeleteOnExit() is allowed?

Jason

________________________________________
From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> on behalf of Brian Burkhalter <brian.burkhalter at oracle.com>
Sent: Tuesday, July 9, 2019 1:08 PM
To: core-libs-dev
Subject: Re: 8193072: File.delete() should remove its path from DeleteOnExitHook.files


> On Jul 9, 2019, at 8:31 AM, Brian Burkhalter <brian.burkhalter at oracle.com> wrote:
>
>> Since deleteOnExit() is an deliberate act, perhaps there should be a corresponding withdrawDeleteOnExit() that reverses it so that it is intentional and not a side-effect of other File methods.
>
> I think this is a better idea. Perhaps “cancelDeleteOnExit()”.

If we want to go this route, here is one possibility:

http://cr.openjdk.java.net/~bpb/8193072/webrev.02/

Of course a CSR would be called for if this is agreed upon.

Thanks,

Brian


More information about the core-libs-dev mailing list