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

2023-07-17 Thread Phuc Hong Tran (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-15152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17744017#comment-17744017
 ] 

Phuc Hong Tran commented on KAFKA-15152:


[~divijvaidya] Can you review my pr? Thanks

> Fix incorrect format specifiers when formatting string
> --
>
> Key: KAFKA-15152
> URL: https://issues.apache.org/jira/browse/KAFKA-15152
> Project: Kafka
>  Issue Type: Bug
>Reporter: Divij Vaidya
>Assignee: Phuc Hong Tran
>Priority: Minor
>  Labels: newbiw
>
> *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 stateme

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

2023-07-10 Thread Phuc Hong Tran (Jira)


[ 
https://issues.apache.org/jira/browse/KAFKA-15152?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17741814#comment-17741814
 ] 

Phuc Hong Tran commented on KAFKA-15152:


Hi [~divijvaidya], can I have this one assign to me? Thanks

> Fix incorrect format specifiers when formatting string
> --
>
> Key: KAFKA-15152
> URL: https://issues.apache.org/jira/browse/KAFKA-15152
> Project: Kafka
>  Issue Type: Bug
>Reporter: Divij Vaidya
>Priority: Minor
>  Labels: newbiw
>
> *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. Consi