summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
diff options
context:
space:
mode:
authorRobin Rosenberg <robin.rosenberg@dewire.com>2013-04-05 00:07:20 +0200
committerGerrit Code Review @ Eclipse.org <gerrit@eclipse.org>2013-04-04 18:08:06 -0400
commitd90656f5366ba7bebd7c98e7b9a7affc5387a612 (patch)
treee76ce9c3e6bdf4ff28553b8494c9ea701bfb7c29 /org.eclipse.jgit/src
parent93a27ce7287c5574bcf1ed872e8964314fc8818b (diff)
downloadjgit-d90656f5366ba7bebd7c98e7b9a7affc5387a612.tar.gz
jgit-d90656f5366ba7bebd7c98e7b9a7affc5387a612.zip
Fix a possible NPE
String.valueOf is an overloaded and the compiler unfortunately picks the wrong one since null contains no type information. Change-Id: Icd197eaa046421f3cfcc5bf3e7601dc5bc7486b6
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java2
1 files changed, 1 insertions, 1 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 4789fbe93f..95a1f352b1 100644
--- a/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java
+++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java
@@ -103,7 +103,7 @@ public class NameRevCommand extends GitCommand<Map<ObjectId, String>> {
if (tip != null)
sb.append(format());
else
- sb.append(String.valueOf(null));
+ sb.append((Object) null);
sb.append(',').append(cost).append(']').append(' ')
.append(super.toString()).toString();
return sb.toString();