From 65e3e4b9b9557d855d49f791d66d7e8050bfd570 Mon Sep 17 00:00:00 2001 From: Cali0707 Date: Fri, 6 Dec 2024 10:31:54 -0500 Subject: [PATCH] fix: build issues introduced in merge Signed-off-by: Cali0707 --- .../kafka/broker/core/filter/Filter.java | 6 ++--- .../main/ConsumerVerticleBuilder.java | 22 ------------------- 2 files changed, 3 insertions(+), 25 deletions(-) diff --git a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/filter/Filter.java b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/filter/Filter.java index c6f6943c09..a5d6c70dfd 100644 --- a/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/filter/Filter.java +++ b/data-plane/core/src/main/java/dev/knative/eventing/kafka/broker/core/filter/Filter.java @@ -41,10 +41,10 @@ static Filter fromContract(DataPlaneContract.DialectedFilter filter) { case PREFIX -> new PrefixFilter(filter.getPrefix().getAttributesMap()); case SUFFIX -> new SuffixFilter(filter.getSuffix().getAttributesMap()); case NOT -> new NotFilter(fromContract(filter.getNot().getFilter())); - case ANY -> new AnyFilter(filter.getAny().getFiltersList().stream() + case ANY -> AnyFilter.newFilter(filter.getAny().getFiltersList().stream() .map(Filter::fromContract) .collect(Collectors.toList())); - case ALL -> new AllFilter(filter.getAll().getFiltersList().stream() + case ALL -> AllFilter.newFilter(filter.getAll().getFiltersList().stream() .map(Filter::fromContract) .collect(Collectors.toList())); case CESQL -> new CeSqlFilter(filter.getCesql().getExpression()); @@ -53,6 +53,6 @@ static Filter fromContract(DataPlaneContract.DialectedFilter filter) { } static Filter fromContract(List filters) { - return new AllFilter(filters.stream().map(Filter::fromContract).collect(Collectors.toList())); + return AllFilter.newFilter(filters.stream().map(Filter::fromContract).collect(Collectors.toList())); } } diff --git a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/main/ConsumerVerticleBuilder.java b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/main/ConsumerVerticleBuilder.java index a80dae87cd..436ff73059 100644 --- a/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/main/ConsumerVerticleBuilder.java +++ b/data-plane/dispatcher/src/main/java/dev/knative/eventing/kafka/broker/dispatcher/main/ConsumerVerticleBuilder.java @@ -185,28 +185,6 @@ private Filter getFilter() { return Filter.noop(); } - private static Filter getFilter(List filters) { - return AllFilter.newFilter( - filters.stream().map(ConsumerVerticleBuilder::getFilter).collect(Collectors.toList())); - } - - private static Filter getFilter(DataPlaneContract.DialectedFilter filter) { - return switch (filter.getFilterCase()) { - case EXACT -> new ExactFilter(filter.getExact().getAttributesMap()); - case PREFIX -> new PrefixFilter(filter.getPrefix().getAttributesMap()); - case SUFFIX -> new SuffixFilter(filter.getSuffix().getAttributesMap()); - case NOT -> new NotFilter(getFilter(filter.getNot().getFilter())); - case ANY -> AnyFilter.newFilter(filter.getAny().getFiltersList().stream() - .map(ConsumerVerticleBuilder::getFilter) - .collect(Collectors.toList())); - case ALL -> AllFilter.newFilter(filter.getAll().getFiltersList().stream() - .map(ConsumerVerticleBuilder::getFilter) - .collect(Collectors.toList())); - case CESQL -> new CeSqlFilter(filter.getCesql().getExpression()); - default -> Filter.noop(); - }; - } - private WebClientOptions createWebClientOptionsFromCACerts(final String caCerts) { final var pemTrustOptions = new PemTrustOptions(); for (String trustBundle : consumerVerticleContext.getTrustBundles()) {