Fix NPE in ObjectIdOwnerMap#get

Change-Id: I3812961a27ac410d610ef50c73a28f21bb05ae79
Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
This commit is contained in:
Matthias Sohn 2019-08-17 00:18:50 +02:00
parent 41da8de001
commit a4216e5382
1 changed files with 3 additions and 0 deletions

View File

@ -135,6 +135,9 @@ public void clear() {
*/
@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)