directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Felix Knecht <fe...@otego.com>
Subject Uncheck file operations
Date Sat, 01 Oct 2011 14:32:21 GMT
Hi

ApacheDs and probably also Shared has in many locations file operations 
like File.[delete|mkdir|...] where the return value (true|false) is 
unchecked. In Java-1.7 exists static methods for this in 
java.nio.file.Files [1] where an IOException is thrown if the operation 
fails, in < Java-1.7 a SecurityException is thrown only in some special 
cases and in all other cases the return value is 'false' and no 
Exception is thrown [2]. IMO we should check the return value of these 
operations and throw an IOException if the file/directory couldn't be 
created/delete/renamed ...
If wanted I'll create a JIRA and go for it.

WDOT?

Regards
Felix

[1] 
http://download.oracle.com/javase/7/docs/api/java/nio/file/Files.html#delete%28java.nio.file.Path%29
[2] 
http://download.oracle.com/javase/6/docs/api/java/io/File.html#delete%28%29

Mime
View raw message