Skip to content

Fix serviceclientconfig build issues #3864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
package software.amazon.awssdk.codegen.poet.client;

import static java.util.stream.Collectors.toList;
import static javax.lang.model.element.Modifier.ABSTRACT;
import static javax.lang.model.element.Modifier.DEFAULT;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PUBLIC;
Expand Down Expand Up @@ -495,7 +494,8 @@ protected MethodSpec utilitiesMethod() {
protected MethodSpec serviceClientConfigMethod() {
return MethodSpec.methodBuilder("serviceClientConfiguration")
.addAnnotation(Override.class)
.addModifiers(PUBLIC, ABSTRACT)
.addModifiers(PUBLIC, DEFAULT)
.addStatement("throw new $T()", UnsupportedOperationException.class)
.returns(new PoetExtension(model).getServiceConfigClass())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import static java.util.stream.Collectors.toCollection;
import static java.util.stream.Collectors.toList;
import static javax.lang.model.element.Modifier.ABSTRACT;
import static javax.lang.model.element.Modifier.DEFAULT;
import static javax.lang.model.element.Modifier.FINAL;
import static javax.lang.model.element.Modifier.PUBLIC;
Expand Down Expand Up @@ -534,7 +533,8 @@ protected MethodSpec utilitiesMethod() {
protected MethodSpec serviceClientConfigMethod() {
return MethodSpec.methodBuilder("serviceClientConfiguration")
.addAnnotation(Override.class)
.addModifiers(PUBLIC, ABSTRACT)
.addModifiers(PUBLIC, DEFAULT)
.addStatement("throw new $T()", UnsupportedOperationException.class)
.returns(new PoetExtension(model).getServiceConfigClass())
.build();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1743,7 +1743,9 @@ default CompletableFuture<StreamingOutputOperationResponse> streamingOutputOpera
}

@Override
JsonServiceClientConfiguration serviceClientConfiguration();
default JsonServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}

/**
* Create a {@link JsonAsyncClient} with the region loaded from the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1684,5 +1684,7 @@ static ServiceMetadata serviceMetadata() {
}

@Override
JsonServiceClientConfiguration serviceClientConfiguration();
default JsonServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@
public interface AwsClient extends SdkClient {

@Override
AwsServiceClientConfiguration serviceClientConfiguration();
default AwsServiceClientConfiguration serviceClientConfiguration() {
throw new UnsupportedOperationException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

import org.openjdk.jmh.infra.Blackhole;
import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
import software.amazon.awssdk.services.dynamodb.DynamoDbServiceClientConfiguration;

abstract class V2TestDynamoDbBaseClient implements DynamoDbClient {
protected final Blackhole bh;
Expand All @@ -34,10 +33,4 @@ public String serviceName() {
@Override
public void close() {
}

@Override
public DynamoDbServiceClientConfiguration serviceClientConfiguration() {
return null;
}

}