Skip to content

Commit

Permalink
Add back filtering for actual getFieldFilter() overriding
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Dec 11, 2023
1 parent d7d8d5e commit fd83fe9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,10 @@ public void onIndexModule(IndexModule indexModule) {

@Override
public Function<String, Predicate<String>> getFieldFilter() {
List<Function<String, Predicate<String>>> items = filterPlugins(MapperPlugin.class).stream().map(p -> p.getFieldFilter()).toList();
if (items.size() > 1) {
List<Function<String, Predicate<String>>> items = filterPlugins(MapperPlugin.class).stream()
.map(p -> p.getFieldFilter())
.filter(p -> p.equals(NOOP_FIELD_FILTER) == false)
.toList(); if (items.size() > 1) {
throw new UnsupportedOperationException("Only the security MapperPlugin should override this");
} else if (items.size() == 1) {
return items.get(0);
Expand Down

0 comments on commit fd83fe9

Please sign in to comment.