Skip to content

feat - fully handle multiple record constructors #16

Closed

Description

@mxyns

still need a way to select which constructor to use (either by using annotation or finding out which one to use depending on the bindings)

Activity

  1. mxyns commented on Mar 4, 2022

    @mxyns
    CollaboratorAuthor

    names of constructor parameters are dropped by compiler so for :

    record TestRecord7(long val) {
    
        @JsonCreator
        public TestRecord7(int valInt) {
            this(Long.valueOf(valInt));
        }
    }

    The name valInt gets dropped by compiler and changed to arg0 so the binding for valInt is not found and class instanciation fails

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions