Skip to content

Commit cffb077

Browse files
use orElseGet
1 parent 2d93c8d commit cffb077

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

smithy-typescript-codegen/src/main/java/software/amazon/smithy/typescript/codegen/integration/HttpBindingProtocolGenerator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ private List<HttpBinding> writeResponseBody(
829829
List<HttpBinding> documentBindings = bindingIndex.getResponseBindings(operationOrError, Location.DOCUMENT);
830830
boolean shouldWriteDefaultBody = operationOrError.asOperationShape()
831831
.map(operation -> shouldWriteDefaultOutputBody(context, operation))
832-
.orElse(shouldWriteDefaultErrorBody(context, operationOrError.asStructureShape().get()));
832+
.orElseGet(() -> shouldWriteDefaultErrorBody(context, operationOrError.asStructureShape().get()));
833833
return writeBody(context, operationOrError, payloadBindings, documentBindings, shouldWriteDefaultBody, false);
834834
}
835835

0 commit comments

Comments
 (0)