Skip to content

Commit

Permalink
Remove bug from getOptionalRequest method (Consensys#7730)
Browse files Browse the repository at this point in the history
  • Loading branch information
courtneyeh authored Nov 17, 2023
1 parent ac62bb7 commit 93177af
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ public <T> T getRequestBody() {
}

@Override
@SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"})
public <T> Optional<T> getOptionalRequestBody() throws JsonProcessingException {
return Optional.of((T) requestBody);
return Optional.ofNullable(getRequestBody());
}

@Override
Expand Down

0 comments on commit 93177af

Please sign in to comment.