>> But the Javadoc for File#delete() does not make it clear what the return > value means (see above). > From what I read here (and FindBugs say) in case of file NOT deleted only a > false will be returned (no exception will be thrown by File):
I understand. But it doesn't provide any explanation as to *why* the file might not have been deleted. Was it because the file didn't exist? Because there was some internal error in the file system? Something else? > http://download.oracle.com/javase/6/docs/api/java/io/File.html#delete%28%29 > so the idea: like in the doPut, return a boolean indicating what happened > inside, and in the caller method see if return an HTTP error or other ... > > protected boolean doPut(Path path, Object value) throws QueryException { > > protected void doDelete(Path path) throws QueryException { > -- this is the signature to change, not the other (of the Servlet), so > it's even safe to do in the 2.0.1 if wanted. The method signature does not need to change. If the file doesn't exist, an HTTP 404 should be returned via QueryException. If any other error occurs, it should also be returned via QueryException (using whatever HTTP status code is appropriate).
