Skip to content

1.1.2 aws-lambda-java-serialization release #410

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

Merged
merged 1 commit into from
Mar 10, 2023
Merged

Conversation

smirnoal
Copy link
Contributor

@smirnoal smirnoal commented Mar 10, 2023

Description of changes:

  • Update jackson-databind from 2.10.5.1 to 2.14.2
  • Update gson from 2.8.9 to 2.10.1
  • Update json from 20160810 to 20230227
  • Register JDK8, JavaTime and Joda modules for jackson-serialization.
  • Remove unit tests inside the aws-lambda-java-serialization lib and run the test suite from aws-lambda-java-tests.
  • Remove VoidSerializer used to serialize void as not null
  • Stage 1.1.2 serialization lib release

Note:

  1. jackson-databind >= v2.12.0 explicitly fails (de)serialization of org.joda.time.* types in absence of registered custom (de)serializers. PR #2776. Registering JodaModule module is required to (de)serialize org.joda.time.* types. However, the JodaModule brings the joda time dependency which we need to relocate in order not to clash with the one provided by customers (if they provide one). Due to the following MSHADE-156 bug, the Maven shade plugin will relocate string literals too, breaking our serialization logic. As a workaround, adding a 'fake' relocation pattern in order to prevent such behaviour.
  2. Unit tests were removed because they do not run against the shaded jar so they fail. aws-lambda-java-tests package contains a more exhaustive test suite so the Github workflow will now run those tests when editing aws-lambda-java-serialization lib.
  3. VoidSerializer is not working in Java17 because after Java11 there was a change in the implementation of the java.lang.Void class. In java11 the Void class had a no-arg constructor that was accessible, which allowed us to create a new instance of Void using reflection but starting from Java12 the Void class was modified to have a private constructor that takes no arguments in order to prevent its instantiation.

The change is authored by Anrea Culot, @andclt
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@@ -56,7 +56,7 @@
<dependency>
<groupId>com.amazonaws</groupId>
<artifactId>aws-lambda-java-serialization</artifactId>
<version>1.0.0</version>
<version>1.1.0</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

After releasing the new serialization-lib we should update the dependency here

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes, will do a separate PR once the library is published to maven

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