-
Notifications
You must be signed in to change notification settings - Fork 890
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
Migration Tool - PutObjectRequest setters #6001
Migration Tool - PutObjectRequest setters #6001
Conversation
newMethodName: withBucket | ||
- org.openrewrite.java.ChangeMethodName: | ||
methodPattern: com.amazonaws.services.s3.model.ListObjectsV2Request withBucketName(String) | ||
newMethodName: withBucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing these as they are redundant with recent recipe addition to remove in V1SetterToV2
AccessControlPolicy accessControlList = AccessControlPolicy.builder() | ||
.build(); | ||
|
||
PutObjectRequest request = /*AWS SDK for Java v2 migration: Transform for PutObjectRequest setter accessControlList is not supported, please manually migrate your code to use the v2 setters: acl, grantReadACP, grantWriteACP - https://sdk.amazonaws.com/java/api/latest/software/amazon/awssdk/services/s3/model/PutObjectRequest.Builder.html#acl(java.lang.String)*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there an easy way to combine all comments for a method invocation into the same comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not that I can think of. We'd have to retrieve and parse the comment. Seems better to put on separate lines especially with the links to javadocs.
|
Motivation and Context
Adds support for S3 POJO transforms:
ObjectTagging, AccessControlList
Adds support for
PutObjectRequest
setters:redirectLocation, tagging
Adds comments for
PutObjectRequest
unsupported setters:sseCustomerKey, sseAwsKeyManagementParams, accessControlList
Adds type check for
ObjectMetadata
arg inputObject(bucket, key, InputStream, ObjectMetadata)
, as user could pass in a non variable, e.g. emptynew ObjectMetadata()
or mock valueany(ObjectMetadata.class)
Testing
Added end to end tests