DATAMONGO-2225 - Fix potential NPE in MongoExampleMapper.

This commit is contained in:
Christoph Strobl
2019-03-18 13:44:13 +01:00
parent 2dc7c0ecb4
commit 78fc2e0456

View File

@@ -277,7 +277,7 @@ public class MongoExampleMapper {
}
private static boolean isEmptyIdProperty(Entry<String, Object> entry) {
return entry.getKey().equals("_id") && entry.getValue() == null || entry.getValue().equals(Optional.empty());
return entry.getKey().equals("_id") && (entry.getValue() == null || entry.getValue().equals(Optional.empty()));
}
private static void applyStringMatcher(Map.Entry<String, Object> entry, StringMatcher stringMatcher,