Skip to content

Commit

Permalink
stabilize order of client plugin additions (#545)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucix-aws authored Oct 7, 2024
1 parent d479fb7 commit a73f41b
Showing 1 changed file with 11 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
Expand Down Expand Up @@ -244,12 +244,12 @@ public SmithyBuilder<RuntimeClientPlugin> toBuilder() {
public static final class Builder implements SmithyBuilder<RuntimeClientPlugin> {
private BiPredicate<Model, ServiceShape> servicePredicate = (model, service) -> true;
private OperationPredicate operationPredicate = (model, service, operation) -> false;
private Set<ConfigField> configFields = new HashSet<>();
private Set<ConfigFieldResolver> configFieldResolvers = new HashSet<>();
private Set<ClientMember> clientMembers = new HashSet<>();
private Set<ClientMemberResolver> clientMemberResolvers = new HashSet<>();
private Set<AuthParameter> authParameters = new HashSet<>();
private Set<AuthParametersResolver> authParameterResolvers = new HashSet<>();
private Set<ConfigField> configFields = new LinkedHashSet<>();
private Set<ConfigFieldResolver> configFieldResolvers = new LinkedHashSet<>();
private Set<ClientMember> clientMembers = new LinkedHashSet<>();
private Set<ClientMemberResolver> clientMemberResolvers = new LinkedHashSet<>();
private Set<AuthParameter> authParameters = new LinkedHashSet<>();
private Set<AuthParametersResolver> authParameterResolvers = new LinkedHashSet<>();
private Map<String, GoWriter.Writable> endpointBuiltinBindings = new HashMap<>();
private MiddlewareRegistrar registerMiddleware;
private Map<ShapeId, AuthSchemeDefinition> authSchemeDefinitions = new HashMap<>();
Expand Down Expand Up @@ -350,7 +350,7 @@ public Builder servicePredicate(BiPredicate<Model, ServiceShape> servicePredicat
* @return Returns the builder.
*/
public Builder configFields(Collection<ConfigField> configFields) {
this.configFields = new HashSet<>(configFields);
this.configFields = new LinkedHashSet<>(configFields);
return this;
}

Expand Down Expand Up @@ -384,7 +384,7 @@ public Builder addConfigField(ConfigField configField) {
* @return Returns the builder.
*/
public Builder configFieldResolvers(Collection<ConfigFieldResolver> configFieldResolvers) {
this.configFieldResolvers = new HashSet<>(configFieldResolvers);
this.configFieldResolvers = new LinkedHashSet<>(configFieldResolvers);
return this;
}

Expand Down Expand Up @@ -418,7 +418,7 @@ public Builder addConfigFieldResolver(ConfigFieldResolver configFieldResolver) {
* @return Returns the builder.
*/
public Builder clientMembers(Collection<ClientMember> clientMembers) {
this.clientMembers = new HashSet<>(clientMembers);
this.clientMembers = new LinkedHashSet<>(clientMembers);
return this;
}

Expand Down Expand Up @@ -450,7 +450,7 @@ public Builder addClientMember(ClientMember clientMember) {
* @return Returns the builder.
*/
public Builder clientMemberResolvers(Collection<ClientMemberResolver> clientMemberResolvers) {
this.clientMemberResolvers = new HashSet<>(clientMemberResolvers);
this.clientMemberResolvers = new LinkedHashSet<>(clientMemberResolvers);
return this;
}

Expand Down

0 comments on commit a73f41b

Please sign in to comment.