]> source.dussan.org Git - jgit.git/commitdiff
[errorprone] NameRevCommand: remove ignored call of #toString 41/185341/7
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 12 Sep 2021 16:46:01 +0000 (18:46 +0200)
committerMatthias Sohn <matthias.sohn@sap.com>
Wed, 29 Sep 2021 15:13:02 +0000 (17:13 +0200)
This fixes errorprone error: [ReturnValueIgnored] Return value of
'toString' must be used.

Change-Id: I90d2725ae16725a053179322cfaab18cab7b8e68

org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java

index 03c3a03e08245e2b3ec541b8b7cf694c22260fac..e6ab1e6588731467a765618f281d2da96bf485a8 100644 (file)
@@ -66,12 +66,13 @@ public class NameRevCommand extends GitCommand<Map<ObjectId, String>> {
                public String toString() {
                        StringBuilder sb = new StringBuilder(getClass().getSimpleName())
                                .append('[');
-                       if (tip != null)
+                       if (tip != null) {
                                sb.append(format());
-                       else
+                       } else {
                                sb.append((Object) null);
+                       }
                        sb.append(',').append(cost).append(']').append(' ')
-                               .append(super.toString()).toString();
+                                       .append(super.toString());
                        return sb.toString();
                }
        }