summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2021-09-12 18:46:01 +0200
committerMatthias Sohn <matthias.sohn@sap.com>2021-09-29 17:13:02 +0200
commitf3eff2308f4a128029e65a46de2ba2a5533cdc6b (patch)
treeeb566305abeef3ea3617f9f9acf32847b7391b5d /org.eclipse.jgit
parent1d280db1472f7ec4bf26d6a14f7c3d8a0292b0e7 (diff)
downloadjgit-f3eff2308f4a128029e65a46de2ba2a5533cdc6b.tar.gz
jgit-f3eff2308f4a128029e65a46de2ba2a5533cdc6b.zip
[errorprone] NameRevCommand: remove ignored call of #toString
This fixes errorprone error: [ReturnValueIgnored] Return value of 'toString' must be used. Change-Id: I90d2725ae16725a053179322cfaab18cab7b8e68
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java
index 03c3a03e08..e6ab1e6588 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java
@@ -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();
}
}