[
https://issues.apache.org/jira/browse/KAFKA-20646?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18084639#comment-18084639
]
Basivi Vanga commented on KAFKA-20646:
--------------------------------------
https://github.com/apache/kafka/pull/22428
> 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
> Priority: Minor
> Labels: cleanup, locale, new-bie
>
> 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)