Skip to content

JsonbTypeDeserializer should support parameter elements #71

@jansupol

Description

@jansupol

I can do this:

public class Foo {
  private UUID id;
  @JsonbTypeDeserializer(UUIDDeserializer.class)
  public setId(UUID id) {
    this.id = id;
  }
}

But I can't do this:

public class Foo {
  private final UUID id;
  @JsonbCreator
  public Foo(
    @JsonbParameter("id") @JsonbTypeDeserializer(UUIDDeserializer.class) UUID id
  ) {
    this.id = id;
  }
}

Even though the above is semantically identical. The reason it doesn't work is that the @Target for the @JsonbTypeDeserializer annotation is not configured for parameter elements.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions