Skip to content
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

Fix generic types on Return type for s3 waiters #1639

Merged
merged 2 commits into from
Jul 20, 2018
Merged

Fix generic types on Return type for s3 waiters #1639

merged 2 commits into from
Jul 20, 2018

Conversation

jan-xyz
Copy link
Contributor

@jan-xyz jan-xyz commented Jun 20, 2018

No description provided.

@@ -50,7 +50,7 @@ public AmazonS3Waiters(AmazonS3 client) {
* entered the desired state or not, where polling criteria is bound by
* either default polling strategy or custom polling strategy.
*/
public Waiter bucketNotExists() {
public Waiter<HeadBucketRequest> bucketNotExists() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we all add the generic parameters for the acceptors? (Like HttpFailureStatusAcceptor<HeadBucketResult>?)

@jan-xyz
Copy link
Contributor Author

jan-xyz commented Jun 25, 2018

I pushed the changes for the Http*StatusAcceptors, there remains another warning, I'm not sure how to fix that.

@dagnir
Copy link
Contributor

dagnir commented Jun 25, 2018

What's the error?

@jan-xyz
Copy link
Contributor Author

jan-xyz commented Jun 26, 2018

I get unchecked generic array creation for varargs parameter on the withAcceptor call. I was thinking to solve it like it is solved in other SDKs (e.g. the aws-java-sdk-emr), with one class per waiter state, but the code in there is generated. I could build it like that but I'm not sure if it's the right approach and on my first google I couldn't find how the code generator works.

@dagnir
Copy link
Contributor

dagnir commented Jun 26, 2018

Hmm, I think this actually safe so that should fine; we don't depend on the the type of the temporary array.

@jan-xyz
Copy link
Contributor Author

jan-xyz commented Jun 27, 2018

Okay, is there anything else I can do?

@shorea
Copy link
Contributor

shorea commented Jul 20, 2018

Merged, thanks for the contribution!

@shorea shorea merged commit c66d7f8 into aws:master Jul 20, 2018
@jan-xyz jan-xyz deleted the patch-1 branch July 21, 2018 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants