summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit/src
diff options
context:
space:
mode:
authorMatthias Sohn <matthias.sohn@sap.com>2017-01-23 00:53:50 +0100
committerMatthias Sohn <matthias.sohn@sap.com>2017-01-23 19:55:18 +0100
commitb686c8468c66fb7d2f2c06996085b7d8540a8adc (patch)
treee01742576069668248921594f2205183904fa05f /org.eclipse.jgit/src
parent423a583fcc343137b9369880b9b9a91fe03f6a59 (diff)
downloadjgit-b686c8468c66fb7d2f2c06996085b7d8540a8adc.tar.gz
jgit-b686c8468c66fb7d2f2c06996085b7d8540a8adc.zip
[infer] Fix potential NPE in DiffFormatter
Change-Id: Ia33e2af9ce3393d9173ca0dc7efefd86c965d8c8 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src')
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/diff/DiffFormatter.java2
1 files changed, 1 insertions, 1 deletions
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$