-
Notifications
You must be signed in to change notification settings - Fork 877
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
Convert ByteBuffer to SdkBytes #5798
base: master
Are you sure you want to change the base?
Conversation
cac5f3d
to
0eed4fa
Compare
import software.amazon.awssdk.core.SdkBytes; | ||
import software.amazon.awssdk.v2migration.internal.utils.SdkTypeUtils; | ||
|
||
@SdkInternalApi |
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 class should be in internal package 👀
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.
We don't actually expect customers to consume those classes directly, and they are used indirectly when users run OpenRewrite command, so technically those SDK annotations are not needed (and those recipe classes are not part of the SDK). I can remove them in a separate PR to avoid confusion
|
0eed4fa
to
9a8cd07
Compare
|
Motivation and Context
Similar to #5791 Java SDK v1 uses ByteBuffer to represent binary data while Java SDK v2 uses SdkBytes, so changing the method name is not sufficient for ByteBuffer setters and users will get compilation error.
v1
to
v2
Modifications
Convert ByteBuffer to SdkBytes for POJO setters
Testing
Added end to end tests
Unit tests are not possible for JavaTemplate since it can't recognize the types.
Screenshots (if appropriate)
Types of changes
Checklist
mvn install
succeedsscripts/new-change
script and following the instructions. Commit the new file created by the script in.changes/next-release
with your changes.License