Name: rmT116609 Date: 11/12/2003
A DESCRIPTION OF THE REQUEST :
if java.io.File.delete() fails, the result value is false. there is no further information about the reason why it failed. it would be better that this method would throw a IOException with the reason why it failed. (in my case, it failed because another process still had a reference to the file.)
with the current behaviour (just return false if delete() failed) there is no information why the deletion failed.
EXPECTED VERSUS ACTUAL BEHAVIOR :
e.g. if the file can't be deleted because it's still in access by another process, don't just return false but throw an IOException with the reason (e.g. "File is still referenced by another process.")
the method just returns false.
---------- BEGIN SOURCE ----------
File file = new File("readme.txt");
boolean result = file.delete();
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
you have to guess the reason why delete() failed.
(Incident Review ID: 225294)