Skip to content

KAFKA-20646: Use Locale.ROOT in String.format() calls in tools/ and s…#22428

Open
vanba4772 wants to merge 2 commits into
apache:trunkfrom
vanba4772:KAFKA-string-format-locale
Open

KAFKA-20646: Use Locale.ROOT in String.format() calls in tools/ and s…#22428
vanba4772 wants to merge 2 commits into
apache:trunkfrom
vanba4772:KAFKA-string-format-locale

Conversation

@vanba4772
Copy link
Copy Markdown

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.

…erver-common/

String.format() without a Locale parameter can produce locale-dependent
output (e.g., different decimal separators), which is inconsistent with
the project's existing practice of using Locale.ROOT for toLowerCase()
and toUpperCase() calls.

This commit adds Locale.ROOT as the first argument to all String.format()
calls in the tools/ and server-common/ modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added triage PRs from the community core Kafka Broker tools labels May 31, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-approved core Kafka Broker tools triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants