Konrad Windszus opened MSHARED-989 and commented
In MSHARED-898 DirectoryScanner has been deprecated. Instead using the java.nio.file.DirectoryStream is now recommended.
The latter is often no replacement as the parametrization of DirectoryScanner with Ant-style globs for includes/excludes is not supported. Also the DEFAULTEXCLUDES are not part of Java NIO DirectoryStream either.
The same applies to MatchPatterns, which is deprecated and now recommends using java.nio.filejava.nio.file.DirectoryStream.Filter<T>. Please instead provide a Filter for Java NIO for those patterns (regex and ant) and make DirectoryScanner use File NIO internally while keeping API compatibility.
Otherwise every consumer of DirectoryScanner needs to come up with a custom implementation of pattern matching and a lot of glue code.
Affects: maven-shared-utils-3.3.4
Issue Links:
1 votes, 4 watchers
Konrad Windszus opened MSHARED-989 and commented
In MSHARED-898
DirectoryScannerhas been deprecated. Instead using thejava.nio.file.DirectoryStreamis now recommended.The latter is often no replacement as the parametrization of DirectoryScanner with Ant-style globs for includes/excludes is not supported. Also the
DEFAULTEXCLUDESare not part of Java NIODirectoryStreameither.The same applies to
MatchPatterns, which is deprecated and now recommends usingjava.nio.filejava.nio.file.DirectoryStream.Filter<T>. Please instead provide a Filter for Java NIO for those patterns (regex and ant) and makeDirectoryScanneruse File NIO internally while keeping API compatibility.Otherwise every consumer of DirectoryScanner needs to come up with a custom implementation of pattern matching and a lot of glue code.
Affects: maven-shared-utils-3.3.4
Issue Links:
1 votes, 4 watchers