From 4285e11e3d312b7865294ae645ad752489ce6547 Mon Sep 17 00:00:00 2001 From: courtneyeh Date: Fri, 17 Nov 2023 11:59:49 +1100 Subject: [PATCH] Remove bug from getOptionalRequest method --- .../pegasys/teku/infrastructure/restapi/StubRestApiRequest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/restapi/src/testFixtures/java/tech/pegasys/teku/infrastructure/restapi/StubRestApiRequest.java b/infrastructure/restapi/src/testFixtures/java/tech/pegasys/teku/infrastructure/restapi/StubRestApiRequest.java index 4eb2ceb86f3..e19f21290f2 100644 --- a/infrastructure/restapi/src/testFixtures/java/tech/pegasys/teku/infrastructure/restapi/StubRestApiRequest.java +++ b/infrastructure/restapi/src/testFixtures/java/tech/pegasys/teku/infrastructure/restapi/StubRestApiRequest.java @@ -91,7 +91,7 @@ public T getRequestBody() { @Override @SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"}) public Optional getOptionalRequestBody() throws JsonProcessingException { - return Optional.of((T) requestBody); + return Optional.ofNullable((T) requestBody); } @Override