Skip to content

S3CrtAsyncClientBuilder.build() should return S3CrtAsyncClient #5057

Open
@brianwebb11

Description

@brianwebb11

Describe the bug

I am unable to build an instance of type S3CrtAsyncClient

The document has the following example:
S3AsyncClient s3AsyncClient = S3AsyncClient.crtCreate();

This will indeed build an instance of S3CrtAsyncClient, however the return type of crtCreate() is S3AsyncClient, not S3CrtAsyncClient.

So I can't have code that requires S3CrtAsyncClient without manually casting.

Expected Behavior

I was hoping to have the signature be

S3CrtAsyncClient S3CrtAsyncClientBuilder.build();
instead of the current code
S3AsyncClient S3CrtAsyncClientBuilder.build();

Current Behavior

S3CrtAsyncClient S3CrtAsyncClientBuilder.build();
See https://github.com/aws/aws-sdk-java-v2/blob/master/services/s3/src/main/java/software/amazon/awssdk/services/s3/S3CrtAsyncClientBuilder.java#L339

Reproduction Steps

S3CrtAsyncClient s3AsyncClient = S3AsyncClient.crtCreate();

fails to compile.

Possible Solution

Change
S3AsyncClient S3CrtAsyncClientBuilder.build();
to
S3CrtAsyncClient S3CrtAsyncClientBuilder.build();
here https://github.com/aws/aws-sdk-java-v2/blob/master/services/s3/src/main/java/software/amazon/awssdk/services/s3/S3CrtAsyncClientBuilder.java#L339

Additional Information/Context

No response

AWS Java SDK version used

2.23.4

JDK version used

openjdk 11.0.21 2023-10-17 OpenJDK Runtime Environment Homebrew (build 11.0.21+0) OpenJDK 64-Bit Server VM Homebrew (build 11.0.21+0, mixed mode)

Operating System and version

MacOS

Metadata

Metadata

Assignees

Labels

crt-clientfeature-requestA feature should be added or improved.p2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions