diff --git a/.changelog/6de4cab7037841c59f91b3db81edee9c.json b/.changelog/6de4cab7037841c59f91b3db81edee9c.json new file mode 100644 index 00000000000..0f17f708ffa --- /dev/null +++ b/.changelog/6de4cab7037841c59f91b3db81edee9c.json @@ -0,0 +1,8 @@ +{ + "id": "6de4cab7-0378-41c5-9f91-b3db81edee9c", + "type": "bugfix", + "description": "removed incorrect condition preventing setting retryMaxAttempts via functional options", + "modules": [ + "codegen" + ] +} \ No newline at end of file diff --git a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java index 493c1d62857..025722e396f 100644 --- a/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java +++ b/codegen/smithy-aws-go-codegen/src/main/java/software/amazon/smithy/aws/go/codegen/AddAwsConfigFields.java @@ -377,7 +377,7 @@ private void writeRetryMaxAttemptsFinalizeResolver(GoWriter writer) { writer.write(""" func $finalizeResolveName:L(o *Options, client Client) { - if v := o.RetryMaxAttempts; v == 0 || v == client.options.RetryMaxAttempts { + if v := o.RetryMaxAttempts; v == 0 { return }