]> source.dussan.org Git - jgit.git/commitdiff
[infer] Fix potential NPE in DiffFormatter 86/89386/2
authorMatthias Sohn <matthias.sohn@sap.com>
Sun, 22 Jan 2017 23:53:50 +0000 (00:53 +0100)
committerMatthias Sohn <matthias.sohn@sap.com>
Mon, 23 Jan 2017 18:55:18 +0000 (19:55 +0100)
Change-Id: Ia33e2af9ce3393d9173ca0dc7efefd86c965d8c8
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java

index 819442cbea6b6e21985e3af4981261f9c8dd3480..fa7cc0df877fe9a5095e4999a1405964ecf2f831 100644 (file)
@@ -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$