Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0
-
None
-
None
-
Operating System: Windows XP
Platform: PC
-
30992
Description
Env: Java 1.4.2, commons-io-1.0.jar, Win XP
The AbstractFileFilter's FilenameFilter's accept(File, String) method
implementation constructs the fileName/File (it passes to accept(File))
wrongly - please see below. This causes the DirectoryFileFilter (in example, I
did not have time to check out the other AbstractFileFilter implementations)
failure since it's FileFilter implementation receives the incorrect
filename/File.
Note I stumbled into this in Win Env. and really don't know how it works in
other platforms.
v1.0 code:
public boolean accept(File dir, String name)
correct code should be:
public boolean accept(File dir, String name)