Fix toBuilder to carry forward the sourceLocation
Most existing toBuilders do this, but these ones were missing that logic.
This commit is contained in:
parent
9b4de14a5c
commit
32fbace531
|
@ -101,7 +101,7 @@ public final class AuthorizersTrait extends AbstractTrait implements ToSmithyBui
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return builder().authorizers(authorizers);
|
return builder().sourceLocation(getSourceLocation()).authorizers(authorizers);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -342,6 +342,7 @@ public final class IntegrationTrait extends AbstractTrait implements ToSmithyBui
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return builder()
|
return builder()
|
||||||
|
.sourceLocation(getSourceLocation())
|
||||||
.type(type)
|
.type(type)
|
||||||
.uri(uri)
|
.uri(uri)
|
||||||
.credentials(credentials)
|
.credentials(credentials)
|
||||||
|
|
|
@ -163,6 +163,7 @@ public final class MockIntegrationTrait extends AbstractTrait implements ToSmith
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return builder()
|
return builder()
|
||||||
|
.sourceLocation(getSourceLocation())
|
||||||
.passThroughBehavior(passThroughBehavior)
|
.passThroughBehavior(passThroughBehavior)
|
||||||
.contentHandling(contentHandling)
|
.contentHandling(contentHandling)
|
||||||
.requestParameters(requestParameters)
|
.requestParameters(requestParameters)
|
||||||
|
|
|
@ -76,7 +76,7 @@ public final class CfnResourceTrait extends AbstractTrait
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SmithyBuilder<CfnResourceTrait> toBuilder() {
|
public SmithyBuilder<CfnResourceTrait> toBuilder() {
|
||||||
return builder().name(name).additionalSchemas(additionalSchemas);
|
return builder().sourceLocation(getSourceLocation()).name(name).additionalSchemas(additionalSchemas);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final class Provider extends AbstractTrait.Provider {
|
public static final class Provider extends AbstractTrait.Provider {
|
||||||
|
|
|
@ -76,7 +76,7 @@ public final class CognitoUserPoolsTrait extends AbstractTrait implements ToSmit
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return builder().providerArns(providerArns);
|
return builder().sourceLocation(getSourceLocation()).providerArns(providerArns);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -61,7 +61,7 @@ public final class ClientDiscoveredEndpointTrait extends AbstractTrait
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public SmithyBuilder<ClientDiscoveredEndpointTrait> toBuilder() {
|
public SmithyBuilder<ClientDiscoveredEndpointTrait> toBuilder() {
|
||||||
return builder().required(required);
|
return builder().sourceLocation(getSourceLocation()).required(required);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Builder for {@link ClientDiscoveredEndpointTrait}. */
|
/** Builder for {@link ClientDiscoveredEndpointTrait}. */
|
||||||
|
|
|
@ -91,7 +91,8 @@ public final class ClientEndpointDiscoveryTrait extends AbstractTrait
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return new Builder()
|
return new Builder()
|
||||||
.operation(getOperation())
|
.sourceLocation(getSourceLocation())
|
||||||
|
.operation(operation)
|
||||||
.error(error);
|
.error(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ public final class EndpointTrait extends AbstractTrait implements ToSmithyBuilde
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
return new Builder().hostPrefix(hostPrefix.toString());
|
return new Builder().sourceLocation(getSourceLocation()).hostPrefix(hostPrefix.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -89,7 +89,7 @@ public final class HttpTrait extends AbstractTrait implements ToSmithyBuilder<Ht
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public HttpTrait.Builder toBuilder() {
|
public HttpTrait.Builder toBuilder() {
|
||||||
return new Builder().method(method).uri(uri).code(code);
|
return new Builder().sourceLocation(getSourceLocation()).method(method).uri(uri).code(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -72,7 +72,10 @@ public final class TraitDefinition extends AbstractTrait implements ToSmithyBuil
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Builder toBuilder() {
|
public Builder toBuilder() {
|
||||||
Builder builder = builder().selector(selector).structurallyExclusive(structurallyExclusive);
|
Builder builder = builder()
|
||||||
|
.sourceLocation(getSourceLocation())
|
||||||
|
.selector(selector)
|
||||||
|
.structurallyExclusive(structurallyExclusive);
|
||||||
conflicts.forEach(builder::addConflict);
|
conflicts.forEach(builder::addConflict);
|
||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue