Skip to content

Commit 78fc2e0

Browse files
DATAMONGO-2225 - Fix potential NPE in MongoExampleMapper.
1 parent 2dc7c0e commit 78fc2e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert/MongoExampleMapper.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ private Set<Class<?>> getTypesToMatch(Example<?> example) {
277277
}
278278

279279
private static boolean isEmptyIdProperty(Entry<String, Object> entry) {
280-
return entry.getKey().equals("_id") && entry.getValue() == null || entry.getValue().equals(Optional.empty());
280+
return entry.getKey().equals("_id") && (entry.getValue() == null || entry.getValue().equals(Optional.empty()));
281281
}
282282

283283
private static void applyStringMatcher(Map.Entry<String, Object> entry, StringMatcher stringMatcher,

0 commit comments

Comments
 (0)