On 08/01/2010, Niall Pemberton <niall.pember...@gmail.com> wrote: > On Thu, Jan 7, 2010 at 9:51 PM, sebb <seb...@gmail.com> wrote: > > The overridable methods in DirectoryWalker currently use Collection<?> > > as a parameter type. > > > > As far as I can tell, the Collections need to contain File objects, so > > would it not be better to use Collection<File>? > > > > Might be nice to use Collection<? extends File>, but when I tried that > > there were some problems with the test cases. > > > > Any views? > > > DirectoryWalker doesn't actually control what gets put into the > collection - the user can put whatever they want. So someone could, > for example, use it to add String file names to the collection. If we > lock it down to File then that would break for them.
OK, I see. Perhaps the Javadoc should make this more explicit. Also, there don't seem to be any unit tests apart from ones which use File entries. I'll try to add some. > Niall > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org > For additional commands, e-mail: dev-h...@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org