diff --git a/smithy-aws-iam-traits/src/main/java/software/amazon/smithy/aws/iam/traits/DefineConditionKeysTrait.java b/smithy-aws-iam-traits/src/main/java/software/amazon/smithy/aws/iam/traits/DefineConditionKeysTrait.java index 7a30dfe4126..77fc4b83585 100644 --- a/smithy-aws-iam-traits/src/main/java/software/amazon/smithy/aws/iam/traits/DefineConditionKeysTrait.java +++ b/smithy-aws-iam-traits/src/main/java/software/amazon/smithy/aws/iam/traits/DefineConditionKeysTrait.java @@ -53,8 +53,7 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation - Builder builder = builder(); + Builder builder = builder().sourceLocation(value); for (Map.Entry entry : value.expectObjectNode().getMembers().entrySet()) { ConditionKeyDefinition definition = ConditionKeyDefinition.fromNode( entry.getValue().expectObjectNode()); diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnReferenceTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnReferenceTrait.java index 097b0c6f3d3..c9b5735dc59 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnReferenceTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnReferenceTrait.java @@ -53,9 +53,8 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - //BUG: sourcelocation ObjectNode objectNode = value.expectObjectNode(); - Builder builder = builder(); + Builder builder = builder().sourceLocation(value); objectNode.getStringMember(TYPE) .map(StringNode::getValue) .ifPresent(builder::type); diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnTrait.java index 86fbc1a0e14..3591e5196c7 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ArnTrait.java @@ -70,9 +70,8 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation - Builder builder = builder(); ObjectNode objectNode = value.expectObjectNode(); + Builder builder = builder().sourceLocation(value); builder.template(objectNode.expectStringMember(TEMPLATE).getValue()); builder.absolute(objectNode.getBooleanMemberOrDefault(ABSOLUTE)); builder.noRegion(objectNode.getBooleanMemberOrDefault(NO_REGION)); diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java index d16b5d8a70f..df51dd2f14b 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/ServiceTrait.java @@ -60,9 +60,8 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - // BUG sourceLocation ObjectNode objectNode = value.expectObjectNode(); - Builder builder = builder(); + Builder builder = builder().sourceLocation(value); String sdkId = objectNode.getStringMember("sdkId") .map(StringNode::getValue) .orElseThrow(() -> new SourceException(String.format( diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java index baf69f7c710..5f6c51cf3cc 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/auth/CognitoUserPoolsTrait.java @@ -51,9 +51,9 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation ObjectNode objectNode = value.expectObjectNode(); return builder() + .sourceLocation(value) .providerArns(objectNode.expectArrayMember(PROVIDER_ARNS).getElementsAs(StringNode::getValue)) .build(); } diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java index a4b00e884ce..0a02f9d45b7 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientDiscoveredEndpointTrait.java @@ -91,9 +91,9 @@ public Provider() { @Override public ClientDiscoveredEndpointTrait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation ObjectNode objectNode = value.expectObjectNode(); return builder() + .sourceLocation(value) .required(objectNode.getBooleanMemberOrDefault(REQUIRED, true)) .build(); } diff --git a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java index 896c5c61583..1f8d5ccce47 100644 --- a/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java +++ b/smithy-aws-traits/src/main/java/software/amazon/smithy/aws/traits/clientendpointdiscovery/ClientEndpointDiscoveryTrait.java @@ -146,9 +146,10 @@ public Provider() { @Override public ClientEndpointDiscoveryTrait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation ObjectNode objectNode = value.expectObjectNode(); - Builder builder = builder().operation(objectNode.expectStringMember(OPERATION).expectShapeId()); + Builder builder = builder() + .sourceLocation(value) + .operation(objectNode.expectStringMember(OPERATION).expectShapeId()); objectNode.getStringMember(ERROR).ifPresent(error -> builder.error(error.expectShapeId())); return builder.build(); } diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/traits/AuthTrait.java b/smithy-model/src/main/java/software/amazon/smithy/model/traits/AuthTrait.java index b73a5a08e93..fe6a63c562b 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/traits/AuthTrait.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/traits/AuthTrait.java @@ -60,7 +60,6 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation List values = new ArrayList<>(); for (StringNode node : value.expectArrayNode().getElementsAs(StringNode.class)) { values.add(node.expectShapeId()); diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpErrorTrait.java b/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpErrorTrait.java index 0f0564df232..9da6698b636 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpErrorTrait.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/traits/HttpErrorTrait.java @@ -45,7 +45,6 @@ public Provider() { @Override public Trait createTrait(ShapeId target, Node value) { - // BUG: sourcelocation return new HttpErrorTrait(value.expectNumberNode().getValue().intValue(), value.getSourceLocation()); } } diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/traits/LengthTrait.java b/smithy-model/src/main/java/software/amazon/smithy/model/traits/LengthTrait.java index d7d0a9d6fc6..f10eea827b4 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/traits/LengthTrait.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/traits/LengthTrait.java @@ -109,7 +109,6 @@ public ShapeId getShapeId() { @Override public LengthTrait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation ObjectNode objectNode = value.expectObjectNode(); Long minValue = objectNode.getMember("min") .map(v -> v.expectNumberNode().getValue().longValue()).orElse(null); diff --git a/smithy-model/src/main/java/software/amazon/smithy/model/traits/RangeTrait.java b/smithy-model/src/main/java/software/amazon/smithy/model/traits/RangeTrait.java index 3c5853cd0aa..2284f40b591 100644 --- a/smithy-model/src/main/java/software/amazon/smithy/model/traits/RangeTrait.java +++ b/smithy-model/src/main/java/software/amazon/smithy/model/traits/RangeTrait.java @@ -110,7 +110,6 @@ public ShapeId getShapeId() { @Override public RangeTrait createTrait(ShapeId target, Node value) { - // BUG: sourceLocation ObjectNode objectNode = value.expectObjectNode(); BigDecimal minValue = objectNode.getMember("min") .map(node -> new BigDecimal(node.expectNumberNode().getValue().toString())).orElse(null);