stefanseifert commented on a change in pull request #15:
URL:
https://github.com/apache/sling-org-apache-sling-jcr-contentloader/pull/15#discussion_r832083347
##########
File path: src/main/java/org/apache/sling/jcr/contentloader/PathEntry.java
##########
@@ -392,6 +414,28 @@ public boolean isIgnoredImportProvider(String extension) {
return new HashSet<>(ignoreContentReaders);
}
+ @Override
+ public boolean isImportProviderRequired(@NotNull String name) {
+ boolean required = false;
+
+ if (!this.requireContentReaders.isEmpty()) {
+ // a directive was supplied, so use a filter to check if the
+ // name ends with the suffix and is not listed in the ignored
+ // import provider set
+ required = this.requireContentReaders.stream()
+ .anyMatch(ext ->
Review comment:
imho this part of the code is unnecessary hard to read for that simple
thing it does - probably move this extension extraction code to a separate
method with proper name?
--
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]