Skip to content

Fail to compile Records with non-boolean fields prefixed with is #281

@daniel-b2c2

Description

@daniel-b2c2

The following 'bad' snippet:

@CompiledJson
public record MyClass(
        @JsonAttribute(name = "issuer") String issuer){}

This fails with

error: Unable to find matching property: 'issuer' used in constructor. Either use annotation processor on source code, on bytecode with -parameters flag (to enable parameter names) or manually create an instance via converter
@CompiledJson
^

But in the following 'good' snippet, if you change the name to notissuer, then this works fine.

@CompiledJson
public record MyClass(
        @JsonAttribute(name = "issuer") String notissuer){}

Anybody else see this? Is this some weird interaction with boolean-style boolean isSuer() style fields? For clarity, the field is issuer as in getIssuer not suer as in isSuer

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions