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

Sean Mullan sean.mullan at oracle.com
Wed Jul 10 14:51:07 UTC 2019

On 7/9/19 7:40 PM, Brian Burkhalter wrote:
> I don’t know. On the one hand this does not take an action like reading, writing, or deleting, but on the other it could end up causing files to be left lying around after VM termination which were expected to be deleted. I suppose that could be considered to be some sort of security issue.

Yes I think so.

I would probably just use the same permission 
(FilePermission(file,"delete")). If you have been granted permission to 
delete a file, then you should have permission to cancel that deletion 
as well.


> Thanks,
> Brian
>> On Jul 9, 2019, at 2:26 PM, Jason Mehrens <jason_mehrens at hotmail.com> wrote:
>> Would the SecurityManager need to for permissions (checkWrite or some new permission) before cancelDeleteOnExit() is allowed?

More information about the core-libs-dev mailing list