From 9c4fe35ae9980ec326ef85e8512f2cacfc73b186 Mon Sep 17 00:00:00 2001 From: courtneyeh Date: Fri, 17 Nov 2023 12:22:48 +1100 Subject: [PATCH] Use existing method --- .../teku/infrastructure/restapi/StubRestApiRequest.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 e19f21290f2..6b2e80da1e3 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 @@ -89,9 +89,8 @@ public T getRequestBody() { } @Override - @SuppressWarnings({"unchecked", "TypeParameterUnusedInFormals"}) public Optional getOptionalRequestBody() throws JsonProcessingException { - return Optional.ofNullable((T) requestBody); + return Optional.ofNullable(getRequestBody()); } @Override