From b686c8468c66fb7d2f2c06996085b7d8540a8adc Mon Sep 17 00:00:00 2001 From: Matthias Sohn Date: Mon, 23 Jan 2017 00:53:50 +0100 Subject: [PATCH] [infer] Fix potential NPE in DiffFormatter Change-Id: Ia33e2af9ce3393d9173ca0dc7efefd86c965d8c8 Signed-off-by: Matthias Sohn --- org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java index 819442cbea..fa7cc0df87 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java @@ -682,7 +682,7 @@ public class DiffFormatter implements AutoCloseable { } private static byte[] writeGitLinkText(AbbreviatedObjectId id) { - if (id.toObjectId().equals(ObjectId.zeroId())) { + if (ObjectId.zeroId().equals(id.toObjectId())) { return EMPTY; } return encodeASCII("Subproject commit " + id.name() //$NON-NLS-1$ -- 2.39.5