Skip to content

MN5: Kotlin inject can't introspect java records correctly #12504

@altro3

Description

@altro3

Micronaut 4.10.x:

Image

Micronaut 5.x:

Image

What was changed:

  1. Miconaut 5.0 don't see java record class fields now classEl.getFields() returns emptyList()
  2. Miconaut 5.0 don't see standard record methods like hashCode(), equals(), toString()

Other bugs (existed in micronaut 4.10):

  1. Method isRecord() return false, but it's not a true. It's not so critical and I can fix it by this check: classEl.isAssignable(Record.class.getName())

  2. Method getBeanProperties() returns emptyList, but must be 2 properties - foo and bar

Version

5.0

Metadata

Metadata

Labels

type: bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions