Basivi Vanga created KAFKA-20646:
------------------------------------
Summary: Use Locale.ROOT in String.format() calls in tools/ and
server-common/ modules
Key: KAFKA-20646
URL: https://issues.apache.org/jira/browse/KAFKA-20646
Project: Kafka
Issue Type: Improvement
Components: tools
Reporter: Basivi Vanga
String.format() without a Locale parameter can produce locale-dependent output
(e.g., different decimal separators for numbers, locale-specific formatting).
This is inconsistent
with the project's existing checkstyle rule that enforces Locale.ROOT for
toLowerCase() and toUpperCase() calls.
The tools/ and server-common/ modules contain ~75 occurrences of
String.format( without an explicit Locale. These should be changed to
String.format(Locale.ROOT, ...) for
consistent, locale-independent behavior.
This is a follow-up to KAFKA-20638 which fixed a similar locale issue in
ConsumerGroupCommand.toLowerCase().
Affected files (29):
- tools/: AclCommand, ClientCompatibilityTest, DeleteRecordsCommand, JmxTool,
LeaderElectionCommand, LogDirsCommand, OAuthCompatibilityTool, ToolsUtils,
TopicCommand,
TransactionalMessageCopier, VerifiableConsumer, VerifiableProducer,
ConsumerGroupCommand, ShareGroupCommand, ShareGroupCommandOptions,
ReassignPartitionsCommand,
StreamsGroupCommand
- server-common/: ClientIdAndBroker, StateChangeLogger, CheckpointFile,
Feature, MetadataVersion, QuotaConfig, SharePartitionKey,
DefaultStatePersister, CommandLineUtils,
DecodeJson, JsonValue, BaseHashTable
--
This message was sent by Atlassian Jira
(v8.20.10#820010)