You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Can Cecen (Jira)" <ji...@apache.org> on 2020/06/03 22:13:00 UTC

[jira] [Resolved] (KAFKA-10096) Remove unnecessary String.format call in VersionConditionalTest.java

     [ https://issues.apache.org/jira/browse/KAFKA-10096?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Can Cecen resolved KAFKA-10096.
-------------------------------
    Resolution: Won't Fix

Realized that String.format is used to create line separators. 

> Remove unnecessary String.format call in VersionConditionalTest.java
> --------------------------------------------------------------------
>
>                 Key: KAFKA-10096
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10096
>             Project: Kafka
>          Issue Type: Improvement
>          Components: unit tests
>            Reporter: Can Cecen
>            Assignee: Can Cecen
>            Priority: Trivial
>              Labels: newbie
>
> n.b. This is a newbie ticket designed to be an introduction to contributing for the assignee.
> Since there is no format specified to String.format, we can remove it and just append the line.
>  {code}
> static void assertEquals(CodeBuffer buffer, String... lines) throws Exception {
>         StringWriter stringWriter = new StringWriter();
>         buffer.write(stringWriter);
>         StringBuilder expectedStringBuilder = new StringBuilder();
>         for (String line : lines) {
>             expectedStringBuilder.append(String.format(line));
>         }
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)