diff options
author | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-17 00:18:50 +0200 |
---|---|---|
committer | Matthias Sohn <matthias.sohn@sap.com> | 2019-08-18 11:59:54 +0200 |
commit | a4216e5382026ff9956af82322c7c5af24e0f245 (patch) | |
tree | 47efcf0838b593a7ac0e2131e56b4a8e7ad17119 /org.eclipse.jgit/src/org/eclipse | |
parent | 41da8de001794dcd6a3e782c313cc65abe7d4392 (diff) | |
download | jgit-a4216e5382026ff9956af82322c7c5af24e0f245.tar.gz jgit-a4216e5382026ff9956af82322c7c5af24e0f245.zip |
Fix NPE in ObjectIdOwnerMap#get
Change-Id: I3812961a27ac410d610ef50c73a28f21bb05ae79
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.jgit/src/org/eclipse')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java index 9df593375d..74c712c46c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/lib/ObjectIdOwnerMap.java @@ -135,6 +135,9 @@ public class ObjectIdOwnerMap<V extends ObjectIdOwnerMap.Entry> */ @SuppressWarnings("unchecked") public V get(AnyObjectId toFind) { + if (toFind == null) { + return null; + } int h = toFind.w1; V obj = directory[h & mask][h >>> SEGMENT_SHIFT]; for (; obj != null; obj = (V) obj.next) |