From 78ad086a26ade7500530c076610df8672dbcb583 Mon Sep 17 00:00:00 2001 From: Myroslav Date: Fri, 13 Jun 2025 03:25:09 +0200 Subject: [PATCH] Fixed linter errors. ``` java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java:269: error: [DoubleBraceInitialization] Prefer collection factory methods or builders to the double-brace initialization pattern. java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java:293: error: [DoubleBraceInitialization] Prefer collection factory methods or builders to the double-brace initialization pattern. ``` --- .../dst/greyhound/java/GreyhoundBuilderTest.java | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java b/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java index eb58b987..6fcb6c0a 100644 --- a/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java +++ b/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java @@ -266,11 +266,8 @@ public void configure_consumer_with_exponential_blocking_retry_policy_max_interv @Test public void configure_producer_with_max_request_size_custom_props() throws Exception { - GreyhoundConfig config = new GreyhoundConfig(environment.kafka().bootstrapServers(), new HashMap() { - { - put("max.request.size", "1"); - } - }); + GreyhoundConfig config = new GreyhoundConfig(environment.kafka().bootstrapServers(), + Collections.singletonMap("max.request.size", "1")); GreyhoundProducerBuilder producerBuilder = new GreyhoundProducerBuilder(config); try (GreyhoundProducer producer = producerBuilder.build()) { CompletableFuture producerFuture = producer.produce( @@ -290,11 +287,8 @@ public void configure_consumer_with_max_poll_interval_ms_custom_props() throws E int numOfMessages = 1; List> consumedRecords = new LinkedList<>(); CountDownLatch lock = new CountDownLatch(numOfMessages); - GreyhoundConfig consumerConfig = new GreyhoundConfig(environment.kafka().bootstrapServers(), new HashMap() { - { - put("max.poll.interval.ms", "0"); - } - }); + GreyhoundConfig consumerConfig = new GreyhoundConfig(environment.kafka().bootstrapServers(), + Collections.singletonMap("max.poll.interval.ms", "0")); GreyhoundConsumersBuilder consumersBuilder = new GreyhoundConsumersBuilder(consumerConfig) .withConsumer( GreyhoundConsumer.with(