From ba9f85a9d91055f0118dff993939592a875cffda Mon Sep 17 00:00:00 2001 From: Almog Gavra Date: Mon, 27 Nov 2023 12:19:21 -0800 Subject: [PATCH] fix checkstyle stuff --- .../internal/clients/ResponsiveKafkaClientSupplier.java | 2 +- .../responsive/kafka/internal/metrics/EndOffsetsPoller.java | 2 +- .../dev/responsive/kafka/api/ResponsiveKafkaStreamsTest.java | 4 ++-- .../responsive/kafka/integration/MinimalIntegrationTest.java | 2 -- .../internal/clients/ResponsiveKafkaClientSupplierTest.java | 5 ++++- 5 files changed, 8 insertions(+), 7 deletions(-) diff --git a/kafka-client/src/main/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplier.java b/kafka-client/src/main/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplier.java index 4fbaffb02..6c3fc2b3b 100644 --- a/kafka-client/src/main/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplier.java +++ b/kafka-client/src/main/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplier.java @@ -74,7 +74,7 @@ public ResponsiveKafkaClientSupplier( final ResponsiveStoreRegistry storeRegistry, final ResponsiveMetrics metrics, final CompatibilityMode compatibilityMode - ) { + ) { this(new Factories() {}, clientSupplier, configs, storeRegistry, metrics, compatibilityMode); } diff --git a/kafka-client/src/main/java/dev/responsive/kafka/internal/metrics/EndOffsetsPoller.java b/kafka-client/src/main/java/dev/responsive/kafka/internal/metrics/EndOffsetsPoller.java index 2d12d92fa..3ed37185f 100644 --- a/kafka-client/src/main/java/dev/responsive/kafka/internal/metrics/EndOffsetsPoller.java +++ b/kafka-client/src/main/java/dev/responsive/kafka/internal/metrics/EndOffsetsPoller.java @@ -66,7 +66,7 @@ public EndOffsetsPoller( final Map configs, final ResponsiveMetrics metrics, final KafkaClientSupplier clientSupplier - ) { + ) { this( configs, metrics, diff --git a/kafka-client/src/test/java/dev/responsive/kafka/api/ResponsiveKafkaStreamsTest.java b/kafka-client/src/test/java/dev/responsive/kafka/api/ResponsiveKafkaStreamsTest.java index 6d95a9a52..c23e0a587 100644 --- a/kafka-client/src/test/java/dev/responsive/kafka/api/ResponsiveKafkaStreamsTest.java +++ b/kafka-client/src/test/java/dev/responsive/kafka/api/ResponsiveKafkaStreamsTest.java @@ -16,6 +16,7 @@ package dev.responsive.kafka.api; +import static dev.responsive.kafka.api.config.ResponsiveConfig.COMPATIBILITY_MODE_CONFIG; import static dev.responsive.kafka.api.config.ResponsiveConfig.TENANT_ID_CONFIG; import static org.apache.kafka.clients.consumer.ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG; import static org.apache.kafka.clients.consumer.ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG; @@ -31,7 +32,6 @@ import static org.mockito.Mockito.when; import com.datastax.oss.driver.api.core.CqlSession; -import com.typesafe.config.ConfigException; import dev.responsive.kafka.api.config.CompatibilityMode; import dev.responsive.kafka.api.config.ResponsiveConfig; import dev.responsive.kafka.internal.db.CassandraClient; @@ -151,7 +151,7 @@ public void shouldInvalidateBadConfigs() { @Test public void shouldCreateResponsiveKafkaStreamsInMetricsOnlyModeWithUnverifiedConfigs() { // Given: - properties.put(ResponsiveConfig.COMPATIBILITY_MODE_CONFIG, CompatibilityMode.METRICS_ONLY.name()); + properties.put(COMPATIBILITY_MODE_CONFIG, CompatibilityMode.METRICS_ONLY.name()); properties.put(NUM_STANDBY_REPLICAS_CONFIG, 2); // a config that would cause failure // When: diff --git a/kafka-client/src/test/java/dev/responsive/kafka/integration/MinimalIntegrationTest.java b/kafka-client/src/test/java/dev/responsive/kafka/integration/MinimalIntegrationTest.java index 95a2ed391..dbe8c0c08 100644 --- a/kafka-client/src/test/java/dev/responsive/kafka/integration/MinimalIntegrationTest.java +++ b/kafka-client/src/test/java/dev/responsive/kafka/integration/MinimalIntegrationTest.java @@ -16,7 +16,6 @@ package dev.responsive.kafka.integration; -import static dev.responsive.kafka.api.config.ResponsiveConfig.COMPATIBILITY_MODE_CONFIG; import static dev.responsive.kafka.api.config.ResponsiveConfig.STORE_FLUSH_RECORDS_TRIGGER_CONFIG; import static dev.responsive.kafka.testutils.IntegrationTestUtils.createTopicsAndWait; import static dev.responsive.kafka.testutils.IntegrationTestUtils.pipeInput; @@ -37,7 +36,6 @@ import static org.hamcrest.Matchers.hasItems; import dev.responsive.kafka.api.ResponsiveKafkaStreams; -import dev.responsive.kafka.api.config.CompatibilityMode; import dev.responsive.kafka.api.config.StorageBackend; import dev.responsive.kafka.api.stores.ResponsiveKeyValueParams; import dev.responsive.kafka.api.stores.ResponsiveStores; diff --git a/kafka-client/src/test/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplierTest.java b/kafka-client/src/test/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplierTest.java index 5c1161a96..4973a4f09 100644 --- a/kafka-client/src/test/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplierTest.java +++ b/kafka-client/src/test/java/dev/responsive/kafka/internal/clients/ResponsiveKafkaClientSupplierTest.java @@ -265,7 +265,10 @@ public void shouldNotCreateGlobalOrRestoreConsumerInMetricsCompatibilityMode() { } @NotNull - private ResponsiveKafkaClientSupplier supplier(final Map configs, final CompatibilityMode compat) { + private ResponsiveKafkaClientSupplier supplier( + final Map configs, + final CompatibilityMode compat + ) { return new ResponsiveKafkaClientSupplier( factories, wrapped,