desruisseaux commented on code in PR #11551:
URL: https://github.com/apache/maven/pull/11551#discussion_r2616991829
##########
impl/maven-impl/src/main/java/org/apache/maven/impl/PathSelector.java:
##########
@@ -598,30 +581,73 @@ private static boolean isMatched(Path path, PathMatcher[]
matchers) {
}
/**
- * Returns whether {@link #couldHoldSelected(Path)} may return {@code
false} for some directories.
- * This method can be used to determine if directory filtering
optimization is possible.
- *
- * @return {@code true} if directory filtering is possible, {@code false}
if all directories
- * will be considered as potentially containing selected files
+ * Returns a matcher that can be used for pre-filtering the directories.
+ * The returned matcher can be used as an optimization for skipping whole
directories when possible.
+ * If there is no such optimization, then this method returns {@link
#INCLUDES_ALL}.
*/
- boolean canFilterDirectories() {
- return dirIncludes.length != 0 || dirExcludes.length != 0;
+ public PathMatcher createDirectoryMatcher() {
Review Comment:
True, I will change that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]