Skip to content

Commit ff5b376

Browse files
authored
chore(codegen): remove usage of deprecated APIs (#7395)
1 parent 41a8028 commit ff5b376

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public Map<String, Consumer<TypeScriptWriter>> getRuntimeConfigWriters(
130130
LanguageTarget target
131131
) {
132132
ServiceShape service = settings.getService(model);
133-
Map<String, Consumer<TypeScriptWriter>> runtimeConfigs = new HashMap();
133+
Map<String, Consumer<TypeScriptWriter>> runtimeConfigs = new HashMap<>();
134134
if (isAwsService(service) && target.equals(LanguageTarget.SHARED)) {
135135
String serviceId = service.expectTrait(ServiceTrait.class).getSdkId();
136136
runtimeConfigs.put("serviceId", writer -> writer.write("$S", serviceId));

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ private static Map<String, Object> getPluginFunctionParams(
192192
serviceShape, operationShape));
193193

194194
OperationIndex operationIndex = OperationIndex.of(model);
195-
List membersWithClientEndpointDiscoveryId = getMembersWithClientEndpointDiscoveryId(
195+
List<MemberShape> membersWithClientEndpointDiscoveryId = getMembersWithClientEndpointDiscoveryId(
196196
operationIndex.getInput(operationShape)
197197
);
198198

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static Map<String, TreeSet<String>> getErrorAliases(GenerationContext context,
293293
boolean awsQueryCompatible = service.hasTrait(AwsQueryCompatibleTrait.class);
294294
if (awsQueryCompatible) {
295295
for (OperationShape operation : operations) {
296-
List<ShapeId> errors = operation.getErrors();
296+
Set<ShapeId> errors = operation.getErrorsSet();
297297
for (ShapeId error : errors) {
298298
Shape errorShape = context.getModel().expectShape(error);
299299
if (errorShape.hasTrait(AwsQueryErrorTrait.class)) {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,7 @@ public void generateProtocolTests(GenerationContext context) {
215215
public Map<String, ShapeId> getOperationErrors(GenerationContext context, OperationShape operation) {
216216
Map<String, ShapeId> errors = new TreeMap<>();
217217

218-
operation.getErrors().forEach(shapeId -> {
218+
operation.getErrorsSet().forEach(shapeId -> {
219219
Shape errorShape = context.getModel().expectShape(shapeId);
220220
String errorName = shapeId.getName(context.getService());
221221

0 commit comments

Comments
 (0)