Skip to content

Commit 681704c

Browse files
xeounxzxulpandzic
authored andcommitted
Change Null Check to Optional class
1 parent 9d2c680 commit 681704c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

infobip-spring-data-jdbc-querydsl/src/main/java/com/infobip/spring/data/jdbc/AggregateReferenceType.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ public int[] getSQLTypes() {
1919

2020
@Override
2121
public String getLiteral(AggregateReference value) {
22-
return Optional.of(value).map(AggregateReference::getId).map(Object::toString).orElseGet(null);
22+
return Optional.ofNullable(value).map(AggregateReference::getId).map(Object::toString).orElseGet(null);
2323
}
2424

2525
@Override

0 commit comments

Comments
 (0)