Skip to content

Commit 9af8a73

Browse files
committed
DATAMONGO-2616 - Polishing.
Reformat code. Merge if-statements. Original pull request: #889.
1 parent aaa4557 commit 9af8a73

File tree

1 file changed

+1
-5
lines changed
  • spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert

1 file changed

+1
-5
lines changed

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,7 @@ default <S, T> T mapValueToTargetType(S source, Class<T> targetType, DbRefResolv
127127
@Nullable
128128
default Object convertId(@Nullable Object id, Class<?> targetType) {
129129

130-
if (id == null) {
131-
return null;
132-
}
133-
134-
if(ClassUtils.isAssignableValue(targetType, id)) {
130+
if (id == null || ClassUtils.isAssignableValue(targetType, id)) {
135131
return id;
136132
}
137133

0 commit comments

Comments
 (0)