From fc1ea5f16534d4de9304b13a870998b4f56eb78d Mon Sep 17 00:00:00 2001 From: Ning Yu Date: Tue, 24 Dec 2024 10:30:21 +0800 Subject: [PATCH] style: fix lint Signed-off-by: Ning Yu --- .../org/apache/kafka/tools/automq/perf/PerfConfig.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/src/main/java/org/apache/kafka/tools/automq/perf/PerfConfig.java b/tools/src/main/java/org/apache/kafka/tools/automq/perf/PerfConfig.java index c0b0a35870..a56f2af514 100644 --- a/tools/src/main/java/org/apache/kafka/tools/automq/perf/PerfConfig.java +++ b/tools/src/main/java/org/apache/kafka/tools/automq/perf/PerfConfig.java @@ -11,8 +11,6 @@ package org.apache.kafka.tools.automq.perf; -import java.util.Random; -import java.util.concurrent.ThreadLocalRandom; import org.apache.kafka.common.utils.Exit; import org.apache.kafka.tools.automq.perf.ConsumerService.ConsumersConfig; import org.apache.kafka.tools.automq.perf.ProducerService.ProducersConfig; @@ -29,6 +27,8 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Random; +import java.util.concurrent.ThreadLocalRandom; import static net.sourceforge.argparse4j.impl.Arguments.storeTrue; import static org.apache.kafka.tools.automq.perf.PerfConfig.IntegerArgumentType.nonNegativeInteger; @@ -312,11 +312,11 @@ private String randomTopicPrefix() { } private String randomString(int length) { - final String CHARACTERS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; + final String characters = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; Random r = ThreadLocalRandom.current(); StringBuilder sb = new StringBuilder(length); for (int i = 0; i < length; i++) { - sb.append(CHARACTERS.charAt(r.nextInt(CHARACTERS.length()))); + sb.append(characters.charAt(r.nextInt(characters.length()))); } return sb.toString(); }