mbien commented on code in PR #302:
URL: https://github.com/apache/maven-indexer/pull/302#discussion_r1166234456
##########
indexer-core/src/main/java/org/apache/maven/index/updater/IndexDataReader.java:
##########
@@ -266,10 +295,11 @@ private void addToIndex(
throws IOException {
ArtifactInfo ai = IndexUtils.constructArtifactInfo(doc, context);
if (ai != null) {
- indexWriter.addDocument(IndexUtils.updateDocument(doc, context,
false, ai));
-
- rootGroups.add(ai.getRootGroup());
- allGroups.add(ai.getGroupId());
+ if (filter == null || filter.accept(doc)) {
+ indexWriter.addDocument(IndexUtils.updateDocument(doc,
context, false, ai));
+ rootGroups.add(ai.getRootGroup());
+ allGroups.add(ai.getGroupId());
+ }
Review Comment:
not sure about this one. Should the groups be inside of the if-block?
--
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]