diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/DafnyAwsSdkClientTypeConversionProtocol.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/DafnyAwsSdkClientTypeConversionProtocol.java index 6199f7d11..be85289a6 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/DafnyAwsSdkClientTypeConversionProtocol.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/DafnyAwsSdkClientTypeConversionProtocol.java @@ -492,7 +492,7 @@ private void generateErrorSerializer(final GenerationContext context) { final var errorShapes = awsNormalizedModel.getShapesWithTrait( ErrorTrait.class ).stream() - .sorted(Comparator.comparing(shape -> shape.getId().getName())).collect(Collectors.toCollection(LinkedHashSet::new));; + .sorted(Comparator.comparing(shape -> shape.getId().getName())).collect(Collectors.toCollection(LinkedHashSet::new)); for (final var errorShape : errorShapes) { if ( @@ -639,7 +639,8 @@ private void generateErrorDeserializer(final GenerationContext context) { final Set alreadyVisited = new HashSet<>(); final var errorShapes = awsNormalizedModel.getShapesWithTrait( ErrorTrait.class - ); + ).stream() + .sorted(Comparator.comparing(shape -> shape.getId().getName())).collect(Collectors.toCollection(LinkedHashSet::new)); for (final var errorShape : errorShapes) { if ( !errorShape