You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Divij Vaidya (Jira)" <ji...@apache.org> on 2023/07/06 10:00:00 UTC

[jira] [Created] (KAFKA-15152) Fix incorrect format specifiers when formatting string

Divij Vaidya created KAFKA-15152:
------------------------------------

             Summary: Fix incorrect format specifiers when formatting string
                 Key: KAFKA-15152
                 URL: https://issues.apache.org/jira/browse/KAFKA-15152
             Project: Kafka
          Issue Type: Improvement
            Reporter: Divij Vaidya


*This is a good Jira to be picked up by first time contributors to Kafka code base.*

The objective of this Jira is to fix incorrect formatting of string at multiple places in the code which can cause incorrect print when used in a different locale.

*1. FollowerState.java Line: 121*

This code uses '%s' to format long: updatedHighWatermark (declared at line 117). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 121. Consider formatting this data with '%d' instead.

*2. MemoryRecordsBuilder.java Line: 441*

This code uses '%s' to format long: offset (declared at line 434), lastOffset. This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 441. Consider formatting this data with '%d' instead.

*3. HttpAccessTokenRetriever.java Line: 340*

This code uses '%s' to format int: MAX_RESPONSE_BODY_LENGTH, actualLength (declared at line 338). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 340. Consider formatting this data with '%d' instead.

4. *KafkaAdminClient.java Line: 1256*

This code uses '%s' to format int: correlationId (declared at line 1226). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 1256. Consider formatting this data with '%d' instead.

*5 . Batch.java Line: 170*
This code uses '%s' to format int: epoch (declared at line 163). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 170. Consider formatting this data with '%d' instead.

*6. Batch.java Line: 207*
This code uses '%s' to format int: epoch (declared at line 200). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 207. Consider formatting this data with '%d' instead.

*7. BatchBuilder.java Line: 330*
This code uses '%s' to format int: 'size' expression. This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 330. Consider formatting this data with '%d' instead.

*8. CopartitionedTopicsEnforcer.java Line: 104*
This code uses '%s' to format int: numberOfPartitionsOfInternalTopic (declared at line 99), numPartitionsToUseForRepartitionTopics (defined at line 81). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 104. Consider formatting this data with '%d' instead.

 

*9. RefreshingHttpsJwks.java Line: 337*
This code uses '%s' to format int: MISSING_KEY_ID_MAX_KEY_LENGTH, actualLength (declared at line 335). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 337. Consider formatting this data with '%d' instead.

*10. SerializedJwt.java Line: 47*
This code uses '%s' to format int: splits.length. This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 47. Consider formatting this data with '%d' instead.

*11. ControllerResultAndOffset.java Line: 57*
This code uses '%s' to format long: offset. This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 57. Consider formatting this data with '%d' instead.

*12. ReplicatedLog.java Line: 101*
This code uses '%s' to format long: 'startOffset' expression. This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 101. Consider formatting this data with '%d' instead.

*13. HttpAccessTokenRetriever.java Line: 275*
This code uses '%s' to format int: responseCode (declared at line 240). This is a potential locale-sensitive handling issue. It might cause errors in the handling and processing of the statement at line: 275. Consider formatting this data with '%d' instead.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)