Browse Source

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
stable-3.0
Robin Rosenberg 12 years ago committed by Gerrit Code Review @ Eclipse.org
parent
commit
d90656f536
  1. 2
      org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java

2
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();

Loading…
Cancel
Save