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 21:53:00 UTC

[jira] [Updated] (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 updated KAFKA-10096:
------------------------------
    Description: 
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.
```
 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)); }

```

  was:
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.
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));
        }


> 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.
> ```
>  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)); }
> ```



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