Skip to content

JSON converter caches: field-type-blind cache key, dead sealed-subtype registration for containers, unbounded kotlinx cache #410

Description

@zantvoort
  • JsonORMConverterImpl's CacheKey omits the field type (storm-jackson2/src/main/java/st/orm/jackson/spi/JsonORMConverterImpl.java:65-68) while custom serializers are registered per field type (:111-113). Two @Json fields sharing a @JsonSerialize(using = S) therefore share one cached mapper, and the second field's serializer is silently bypassed.
  • getRawType returns List.class for @Json List<Shape> (:76-78 with :133-141), so sealed-subtype registration is dead for container-typed fields.
  • kotlinx: JSON_CACHE is an unbounded ConcurrentHashMap keyed on a component that buildJson never reads (storm-kotlinx-serialization/src/main/kotlin/st/orm/serialization/spi/JsonORMConverterImpl.kt:48, 51-54).

Same fixes apply to jackson3 (identical line numbers).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions