From 1c5e5e9a983b3a84b11652ac14ec4056c38d4919 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Enrique=20Garc=C3=ADa=20Maci=C3=B1eiras?= Date: Mon, 22 Jan 2024 20:51:37 +0100 Subject: [PATCH] #384 fix styles --- .../java/com/sngular/kloadgen/sampler/AsyncApiSampler.java | 1 + .../sngular/kloadgen/sampler/AsyncapiSamplerWrapper.java | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/sngular/kloadgen/sampler/AsyncApiSampler.java b/src/main/java/com/sngular/kloadgen/sampler/AsyncApiSampler.java index 035a431e..2705b831 100644 --- a/src/main/java/com/sngular/kloadgen/sampler/AsyncApiSampler.java +++ b/src/main/java/com/sngular/kloadgen/sampler/AsyncApiSampler.java @@ -94,6 +94,7 @@ public final SampleResult sample(final Entry entry) { return sampleResult; } + @SuppressWarnings("checkstyle:DesignForExtension") public KafkaProducer getKafkaProducer() { return new KafkaProducer<>(extractProps()); } diff --git a/src/test/java/com/sngular/kloadgen/sampler/AsyncapiSamplerWrapper.java b/src/test/java/com/sngular/kloadgen/sampler/AsyncapiSamplerWrapper.java index f2aa9633..f71127dc 100644 --- a/src/test/java/com/sngular/kloadgen/sampler/AsyncapiSamplerWrapper.java +++ b/src/test/java/com/sngular/kloadgen/sampler/AsyncapiSamplerWrapper.java @@ -4,14 +4,14 @@ public class AsyncapiSamplerWrapper extends AsyncApiSampler { + private KafkaProducer kafkaProducer; + protected AsyncapiSamplerWrapper(final KafkaProducer kafkaProducer) { this.kafkaProducer = kafkaProducer; } - private KafkaProducer kafkaProducer; - @Override - public KafkaProducer getKafkaProducer() { + public final KafkaProducer getKafkaProducer() { return kafkaProducer; } }