Skip to content

Commit

Permalink
Change Null Check to Optional class
Browse files Browse the repository at this point in the history
  • Loading branch information
xeounxzxu committed Jul 4, 2024
1 parent d006bff commit cd7ff81
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public int[] getSQLTypes() {

@Override
public String getLiteral(AggregateReference value) {
return Objects.requireNonNull(Optional.of(value).map(AggregateReference::getId).map(Object::toString).orElse(null));
return Optional.of(value).map(AggregateReference::getId).map(Object::toString).orElseGet(null);
}

@Override
Expand Down

0 comments on commit cd7ff81

Please sign in to comment.