DATAMONGO-2225 - Fix potential NPE in MongoExampleMapper.

This commit is contained in:
Christoph Strobl
2019-03-18 13:44:13 +01:00
parent 9b673d342f
commit 44308bfbe1

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,