Skip to content

Commit

Permalink
remove previous fix attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
kessplas committed Feb 5, 2025
1 parent ac8f171 commit daae2cf
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -358,15 +358,15 @@ public TokenTree generateEnumTypeDefinition(final ShapeId stringShapeId) {
// matches the name. (E.g. the name/value AWS_KMS/aws:kms becomes AWS_KMS/AWS_KMS.)
// In at least one case, S3's OptionalObjectAttributes, this pattern is broken, so in order to make the
// name and value match later on, we prefer the value in Dafny for this shape only.
final List<String> enumValuesToOverride = new ArrayList<>(1);
enumValuesToOverride.add("RestoreStatus");
// final List<String> enumValuesToOverride = new ArrayList<>(1);
// enumValuesToOverride.add("RestoreStatus");

//noinspection OptionalGetWithoutIsPresent
final TokenTree constructors = TokenTree.of(
enumTrait
.getValues()
.stream()
.map(enumDefinition -> enumValuesToOverride.contains(enumDefinition.getValue()) ? enumDefinition.getValue() : enumDefinition.getName().get())
.map(enumDefinition -> enumDefinition.getName().get())
.peek(name -> {
if (!ModelUtils.isValidEnumDefinitionName(name)) {
throw new UnsupportedOperationException(
Expand Down

0 comments on commit daae2cf

Please sign in to comment.