Skip to content

Commit

Permalink
Fix check when adding a new MapperPlugin
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Dec 5, 2023
1 parent 8280753 commit 66fa2cc
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,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();
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) {
Expand Down

0 comments on commit 66fa2cc

Please sign in to comment.