From d90656f5366ba7bebd7c98e7b9a7affc5387a612 Mon Sep 17 00:00:00 2001 From: Robin Rosenberg Date: Fri, 5 Apr 2013 00:07:20 +0200 Subject: [PATCH] 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 --- org.eclipse.jgit/src/org/eclipse/jgit/api/NameRevCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 4789fbe93..95a1f352b 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> { 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();