Skip to content

Commit 97d819b

Browse files
committed
fix(codegen): create a copy of the context
M V EI2: new software.amazon.smithy.aws.typescript.codegen.visitor.MemberDeserVisitor(ProtocolGenerator$GenerationContext, String, TimestampFormatTrait$Format) may expose internal representation by storing an externally mutable object into MemberDeserVisitor.context At MemberDeserVisitor.java:[line 66]
1 parent 3dda85b commit 97d819b

File tree

1 file changed

+1
-1
lines changed
  • codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/visitor

1 file changed

+1
-1
lines changed

codegen/smithy-aws-typescript-codegen/src/main/java/software/amazon/smithy/aws/typescript/codegen/visitor/MemberDeserVisitor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public MemberDeserVisitor(
6363
this.dataSource = dataSource;
6464
this.defaultTimestampFormat = defaultTimestampFormat;
6565
this.serdeElisionIndex = SerdeElisionIndex.of(context.getModel());
66-
this.context = context;
66+
this.context = context.copy();
6767
disableDeserializationFunctionElision = DeserializerElisionDenyList.SDK_IDS.contains(
6868
context.getService().getTrait(ServiceTrait.class)
6969
.map(ServiceTrait::getSdkId)

0 commit comments

Comments
 (0)