Catch possible NPE in FileSupport.delete()

Description

For some reason we got an NPE here:

In this code in FileSupport.delete()

it appears that children is null, which can happen:

https://docs.oracle.com/javase/8/docs/api/java/io/File.html#list--

if the file is not a directory (possibly a race condition where the directory has just been deleted) or an I/O error occurs.

Either way, as failing to delete a directory is relatively harmless, we should check for NPE there rather than let the workflow fail as a result.

Fixed and reviewed
Your pinned fields
Click on the next to a field label to start pinning.

Assignee

Stephen Marquard

Reporter

Stephen Marquard