Description
When overriding methods such as handleFile, a generic Collection object is passed in argument. One is expected to add something to it, such as in this excerpt from DirectoryWalker's own javadoc:
protected void handleFile(File file, int depth, Collection results) { [...] results.add(file); // This lines triggers a warning. }
This code triggers a warning: [unchecked] unchecked call to add(E) as a member of the raw type java.util.Collection. I believe the right fix is to change DirectoryWalker to be parameterized by a type T so that the signature of handleFile (and other similar methods) can be changed to receive a Collection<T> in argument.