Fw: Patch for File Scanning

Alan Bateman Alan.Bateman at oracle.com
Sun Oct 9 17:16:30 PDT 2011

Rémi Forax wrote:
> You can solve this by using the lazy loading of the class.
> static class AcceptAllFilter implements Filter<Object> {
>       static final Filter<Object> ACCEPT_ALL = new AcceptAllFilter();
>       @Override
>       public boolean accept(Object entry) {
>           return true;
>       }
> }
> ...
> return provider(dir).newDirectoryStream(dir, AcceptAllFilter.ACCEPT_ALL);
Sure, but it's just not clear that we need yet another class for this 
(since we started using the holder idiom then we've added quite a few 
classes and for this specific case, I'm not convinced that creating the 
filter object is really an issue).

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/nio-dev/attachments/20111010/3e2ff5e4/attachment.html 

More information about the nio-dev mailing list