diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/AwsSdkToDafnyShapeVisitor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/AwsSdkToDafnyShapeVisitor.java index b7066908f..6d1b0549e 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/AwsSdkToDafnyShapeVisitor.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/AwsSdkToDafnyShapeVisitor.java @@ -4,6 +4,7 @@ import static software.amazon.polymorph.smithygo.utils.Constants.DAFNY_RUNTIME_GO_LIBRARY_MODULE; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import software.amazon.polymorph.smithygo.awssdk.AwsSdkGoPointableIndex; @@ -48,7 +49,7 @@ public class AwsSdkToDafnyShapeVisitor extends ShapeVisitor.Default { protected boolean isPointerType; //TODO: Ideally this shouldn't be static but with current design we need to access this across instances. private static final Map memberShapeConversionFuncMap = - new HashMap<>(); + new LinkedHashMap<>(); public AwsSdkToDafnyShapeVisitor( final GenerationContext context, diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/DafnyToAwsSdkShapeVisitor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/DafnyToAwsSdkShapeVisitor.java index 2013cfe57..aa80be3a3 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/DafnyToAwsSdkShapeVisitor.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/awssdk/shapevisitor/DafnyToAwsSdkShapeVisitor.java @@ -49,7 +49,7 @@ public class DafnyToAwsSdkShapeVisitor extends ShapeVisitor.Default { //TODO: Ideally this shouldn't be static but with current design we need to access this across instances. private static final Map memberShapeConversionFuncMap = - new HashMap<>(); + new LinkedHashMap<>(); public DafnyToAwsSdkShapeVisitor( final GenerationContext context, diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/DafnyToSmithyShapeVisitor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/DafnyToSmithyShapeVisitor.java index c853ee671..ab96a7cbe 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/DafnyToSmithyShapeVisitor.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/DafnyToSmithyShapeVisitor.java @@ -3,6 +3,7 @@ import static software.amazon.polymorph.smithygo.utils.Constants.DAFNY_RUNTIME_GO_LIBRARY_MODULE; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import software.amazon.polymorph.smithygo.codegen.GenerationContext; @@ -52,7 +53,7 @@ public class DafnyToSmithyShapeVisitor extends ShapeVisitor.Default { private final boolean isOptional; //TODO: Ideally this shouldn't be static but with current design we need to access this across instances. private static final Map memberShapeConversionFuncMap = - new HashMap<>(); + new LinkedHashMap<>(); public DafnyToSmithyShapeVisitor( final GenerationContext context, diff --git a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java index 574bd104d..8f777d982 100644 --- a/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java +++ b/codegen/smithy-dafny-codegen/src/main/java/software/amazon/polymorph/smithygo/localservice/shapevisitor/SmithyToDafnyShapeVisitor.java @@ -4,6 +4,7 @@ import static software.amazon.polymorph.smithygo.utils.Constants.DAFNY_RUNTIME_GO_LIBRARY_MODULE; import java.util.HashMap; +import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; import software.amazon.polymorph.smithygo.codegen.GenerationContext; @@ -52,7 +53,7 @@ public class SmithyToDafnyShapeVisitor extends ShapeVisitor.Default { protected boolean isPointerType; //TODO: Ideally this shouldn't be static but with current design we need to access this across instances. private static final Map memberShapeConversionFuncMap = - new HashMap<>(); + new LinkedHashMap<>(); public SmithyToDafnyShapeVisitor( final GenerationContext context,