Skip to content

Release 3.0.5

Latest

Choose a tag to compare

@KyleAure KyleAure released this 30 Jul 19:23
· 41 commits to main since this release

Project updates

  • Update Maven group id from org.eclipse to org.eclipse.yasson
    (PR #729)
    Yasson is the last eclipse project to directly publish to the org.eclipse namespace. All other projects use their own namespace. We will publish to the org.eclipse.yasson namespace going forward and the Eclipse Foundation will work with Sonatype to publish a relocation pom to the old group:archive location.

Bug Fixes

  • NPE when serializing java.sql.Timestamp with a custom date-time formatter
    (PR #725, Issue #577)
    SqlTimestampSerializer cast its argument to TemporalAccessor, but java.sql.Timestamp does not implement that interface, causing a NullPointerException whenever a custom formatter was configured. The fix converts Timestamp to Instant before formatting, matching the existing java.util.Date serialization handling path.

  • YassonParser.isIntegralNumber() throws JsonbException instead of IllegalStateException
    (PR #710, Issue #707)
    The JSON-B specification requires JsonParser.isIntegralNumber() to throw IllegalStateException when the parser state is not VALUE_NUMBER. Yasson incorrectly propagated an internal JsonbException, breaking custom deserializers that caught IllegalStateException to differentiate numeric from string values.

  • Serialization throws IllegalStateException for self-referencing generic types
    (PR #683, Issue #682)
    A prior fix for a StackOverflowError in ReflectionUtils.resolveTypeArguments() introduced a regression: when the resolved type and the type-to-resolve were identical (e.g., recursive hierarchies like UniformTree<T extends UniformTree<T>>), an IllegalStateException was thrown. The fix returns the already-resolved type directly in this case.

  • @JsonbTypeSerializer not applied to Object-typed properties with a specific runtime type
    (PR #690, Issue #689)
    When a property was declared as Object but held an instance of a class annotated with @JsonbTypeSerializer, the custom serializer was silently ignored. Yasson now performs runtime type discovery to locate annotation-based serializers, ensuring consistent behaviour regardless of the declared property type.

  • @JsonbTypeDeserializer / @JsonbTypeSerializer not recognised for types inside container elements
    (PR #686,vIssue #685)
    Type-level @JsonbTypeDeserializer and @JsonbTypeSerializer annotations were not applied when the annotated type appeared as an element or value of a container (Map, Collection, array, Optional). The fix ensures the value-type class model is consulted during custom de/serialization for container elements.

  • JsonStructureToParserAdapter.getValue() throws UnsupportedOperationException
    (PR #694, Issue #673)
    JsonStructureToParserAdapter did not implement the getValue() method required by the JsonParser API. This caused an UnsupportedOperationException in custom JsonbDeserializer implementations that called jp.getValue() to handle polymorphic payloads (string or object).


Test Improvements

  • Locale-dependent failures in DocumentationExampleTest
    (PR #721, Issue #717)
    Number-format tests used the system default locale, causing build failures on non-en_US systems (e.g., de_AT where the decimal separator is a comma). The locale is now fixed to en_US in the affected test POJOs, and a dedicated CI workflow has been added to verify locale-independent behaviour.

New Contributors

Full Changelog: 3.0.4...3.0.5