From: Matthias Sohn Date: Sun, 22 Jan 2017 23:53:50 +0000 (+0100) Subject: [infer] Fix potential NPE in DiffFormatter X-Git-Tag: v4.7.0.201704051617-r~113 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b686c8468c66fb7d2f2c06996085b7d8540a8adc;p=jgit.git [infer] Fix potential NPE in DiffFormatter Change-Id: Ia33e2af9ce3393d9173ca0dc7efefd86c965d8c8 Signed-off-by: Matthias Sohn --- 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$