I have a framework used exclusively for testing that sets fields at runtime. The purpose is to set up test cases. Looking forward to upgrading to Java 14+ records I am noticing that existing utilities such as ReflectionTestUtils.setField
and PropertyAccessorFactory.forDirectFieldAccess
which work on normal private final fields, do not work for record fields.
Is this a limitation of the JVM, or is a limitation of these utilities?
Aucun commentaire:
Enregistrer un commentaire