File tree Expand file tree Collapse file tree 6 files changed +13
-14
lines changed
main/java/software/amazon/awssdk/codegen/poet/client
test/resources/software/amazon/awssdk/codegen/poet/client
core/aws-core/src/main/java/software/amazon/awssdk/awscore
test/sdk-benchmarks/src/main/java/software/amazon/awssdk/benchmark/enhanced/dynamodb Expand file tree Collapse file tree 6 files changed +13
-14
lines changed Original file line number Diff line number Diff line change 1616package software .amazon .awssdk .codegen .poet .client ;
1717
1818import static java .util .stream .Collectors .toList ;
19- import static javax .lang .model .element .Modifier .ABSTRACT ;
2019import static javax .lang .model .element .Modifier .DEFAULT ;
2120import static javax .lang .model .element .Modifier .FINAL ;
2221import static javax .lang .model .element .Modifier .PUBLIC ;
@@ -495,7 +494,8 @@ protected MethodSpec utilitiesMethod() {
495494 protected MethodSpec serviceClientConfigMethod () {
496495 return MethodSpec .methodBuilder ("serviceClientConfiguration" )
497496 .addAnnotation (Override .class )
498- .addModifiers (PUBLIC , ABSTRACT )
497+ .addModifiers (PUBLIC , DEFAULT )
498+ .addStatement ("throw new $T()" , UnsupportedOperationException .class )
499499 .returns (new PoetExtension (model ).getServiceConfigClass ())
500500 .build ();
501501 }
Original file line number Diff line number Diff line change 1717
1818import static java .util .stream .Collectors .toCollection ;
1919import static java .util .stream .Collectors .toList ;
20- import static javax .lang .model .element .Modifier .ABSTRACT ;
2120import static javax .lang .model .element .Modifier .DEFAULT ;
2221import static javax .lang .model .element .Modifier .FINAL ;
2322import static javax .lang .model .element .Modifier .PUBLIC ;
@@ -534,7 +533,8 @@ protected MethodSpec utilitiesMethod() {
534533 protected MethodSpec serviceClientConfigMethod () {
535534 return MethodSpec .methodBuilder ("serviceClientConfiguration" )
536535 .addAnnotation (Override .class )
537- .addModifiers (PUBLIC , ABSTRACT )
536+ .addModifiers (PUBLIC , DEFAULT )
537+ .addStatement ("throw new $T()" , UnsupportedOperationException .class )
538538 .returns (new PoetExtension (model ).getServiceConfigClass ())
539539 .build ();
540540 }
Original file line number Diff line number Diff line change @@ -1743,7 +1743,9 @@ default CompletableFuture<StreamingOutputOperationResponse> streamingOutputOpera
17431743 }
17441744
17451745 @ Override
1746- JsonServiceClientConfiguration serviceClientConfiguration ();
1746+ default JsonServiceClientConfiguration serviceClientConfiguration () {
1747+ throw new UnsupportedOperationException ();
1748+ }
17471749
17481750 /**
17491751 * Create a {@link JsonAsyncClient} with the region loaded from the
Original file line number Diff line number Diff line change @@ -1684,5 +1684,7 @@ static ServiceMetadata serviceMetadata() {
16841684 }
16851685
16861686 @ Override
1687- JsonServiceClientConfiguration serviceClientConfiguration ();
1687+ default JsonServiceClientConfiguration serviceClientConfiguration () {
1688+ throw new UnsupportedOperationException ();
1689+ }
16881690}
Original file line number Diff line number Diff line change 2727public interface AwsClient extends SdkClient {
2828
2929 @ Override
30- AwsServiceClientConfiguration serviceClientConfiguration ();
30+ default AwsServiceClientConfiguration serviceClientConfiguration () {
31+ throw new UnsupportedOperationException ();
32+ }
3133}
Original file line number Diff line number Diff line change 1717
1818import org .openjdk .jmh .infra .Blackhole ;
1919import software .amazon .awssdk .services .dynamodb .DynamoDbClient ;
20- import software .amazon .awssdk .services .dynamodb .DynamoDbServiceClientConfiguration ;
2120
2221abstract class V2TestDynamoDbBaseClient implements DynamoDbClient {
2322 protected final Blackhole bh ;
@@ -34,10 +33,4 @@ public String serviceName() {
3433 @ Override
3534 public void close () {
3635 }
37-
38- @ Override
39- public DynamoDbServiceClientConfiguration serviceClientConfiguration () {
40- return null ;
41- }
42-
4336}
You can’t perform that action at this time.
0 commit comments