Skip to content

Commit 0fdf3ca

Browse files
kuhetrivikr
andcommitted
feat(serde): use ternary
Co-authored-by: Trivikram Kamat <[email protected]>
1 parent b6abf9a commit 0fdf3ca

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

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

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,9 @@ private static boolean hasStreamingBlobDeser(TypeScriptSettings settings, Model
104104
}
105105

106106
public static boolean hasStreamingBlobDeser(TypeScriptSettings settings, Model model, OperationShape operation) {
107-
StructureShape ioShapeToDeser;
108-
if (settings.generateServerSdk()) {
109-
ioShapeToDeser = model.expectShape(operation.getInputShape()).asStructureShape().get();
110-
} else {
111-
ioShapeToDeser = model.expectShape(operation.getOutputShape()).asStructureShape().get();
112-
}
107+
StructureShape ioShapeToDeser = (settings.generateServerSdk())
108+
? model.expectShape(operation.getInputShape()).asStructureShape().get()
109+
: model.expectShape(operation.getOutputShape()).asStructureShape().get();
113110
for (MemberShape member : ioShapeToDeser.members()) {
114111
Shape shape = model.expectShape(member.getTarget());
115112
if (shape instanceof BlobShape && shape.hasTrait(StreamingTrait.class)) {

0 commit comments

Comments
 (0)