DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25742>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25742 jakarta-commons-io FileUtils.listFiles(File, String[], boolean) throws NullPointerException when the second parameter is null Summary: jakarta-commons-io FileUtils.listFiles(File, String[], boolean) throws NullPointerException when the second parameter is null Product: Commons Version: unspecified Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: Other Component: Sandbox AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] jakarta-commons-io FileUtils.listFiles(File, String[], boolean) throws NullPointerException when the second parameter is null. But the javadoc says it should list all files in such a case. Here is the patch: --- FileUtils.java.orig 2003-12-24 12:35:06.000000000 +0200 +++ FileUtils.java 2003-12-24 12:28:22.000000000 +0200 @@ -276,8 +276,13 @@ * @return an collection of java.io.File with the matching files */ public static Collection listFiles(File directory, String[] extensions, boolean recursive) { - String[] suffixes = toSuffixes(extensions); - IOFileFilter filter = new SuffixFileFilter(suffixes); + IOFileFilter filter; + if (extensions == null) { + filter = TrueFileFilter.INSTANCE; + } else { + String[] suffixes = toSuffixes(extensions); + filter = new SuffixFileFilter(suffixes); + } return listFiles(directory, filter, (recursive ? TrueFileFilter.INSTANCE : FalseFileFilter.INSTANCE)); } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
