Skip to content

Simplify generated error unmarshalling code in json protocol based clients#6879

Open
apache-hb wants to merge 1 commit intoaws:masterfrom
apache-hb:master
Open

Simplify generated error unmarshalling code in json protocol based clients#6879
apache-hb wants to merge 1 commit intoaws:masterfrom
apache-hb:master

Conversation

@apache-hb
Copy link
Copy Markdown

Motivation and Context

This reduces the size of the generated client jars by about ~1%, as an example the acm client jar is 0.8% smaller but this scales with the number of operations a service has.

elliothb@ELLIOT-SERVER:~/github/aws-sdk-java-v2-elliothb$ ls -lh acm-before.jar acm-after.jar 
-rw-r--r-- 1 elliothb elliothb 844K Apr  9 12:22 acm-after.jar
-rw-r--r-- 1 elliothb elliothb 850K Apr  9 12:21 acm-before.jar

Modifications

This reduces the amount of code generated for error unmarhsalling in json protocol clients by moving the error response handlers body into a helper method instead of generating a copy in each operation handler.

Testing

  • I did a full rebuild and ran unit tests.

Checklist

  • I have read the CONTRIBUTING document
  • Local run of mvn install succeeds
  • My code follows the code style of this project
  • My change requires a change to the Javadoc documentation
  • I have updated the Javadoc documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed
  • I have added a changelog entry. Adding a new entry must be accomplished by running the scripts/new-change script and following the instructions. Commit the new file created by the script in .changes/next-release with your changes.
  • My change is to implement 1.11 parity feature and I have updated LaunchChangelog

License

  • I confirm that this pull request can be released under the Apache 2 license

@apache-hb apache-hb requested a review from a team as a code owner April 21, 2026 02:29
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.

1 participant