-
Notifications
You must be signed in to change notification settings - Fork 886
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 ObjectMetadata transforms #5970
base: master
Are you sure you want to change the base?
Conversation
|
||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - expirationTimeRuleId - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.expirationTimeRuleId("expirationTimeRuleId"); | ||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - ongoingRestore - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.ongoingRestore(false); | ||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - requesterCharged - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.requesterCharged(false); | ||
|
||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - lastModified - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.lastModified(dateVal); | ||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - httpExpiresDate - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.httpExpiresDate(dateVal); | ||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - expirationTime - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.expirationTime(dateVal); | ||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - restoreExpirationTime - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.restoreExpirationTime(dateVal); | ||
|
||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - header - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.header("key", "val"); | ||
/*AWS SDK for Java v2 migration: Transform for ObjectMetadata setter - addUserMetadata - is not supported, please manually migrate the code by setting it on the v2 PutObjectRequest.*/metadata.addUserMetadata("a", "b"); |
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.
This is very hard to read, can we put the comment on its own line above the line of code it's describing?
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.
I tried that, but then we can't maintain the spacing of the code itself, it would begin on the next line with no indentation. We are doing the same for other comments as well. wdyt?
|
Motivation and Context
Add transforms for
ObjectMetadata
setters, moving them toPutObjectRequest
, and passContentLength
toRequestBody
TODO in follow up PRs:
ObjectMetadata
instantiation (transformed toHeadObjectRespoonse
)Modifications
Updated
JavaIsoVisitor
toJavaVisitor
inS3PutObjectRequestToV2
in order to return a statement:from:
request.setMetadata(metadata);
to:
request = request.toBuilder().setXX(..).setYY(..).build();
Testing
added end to end tests