Revert "[jOOQ/jOOQ#15564] MutablePOJOMapper should be able to map to instance, even if there isn't a default constructor"

This commit is contained in:
Lukas Eder 2023-09-13 09:32:50 +02:00
parent f740a00069
commit fe9e97ce6d

View File

@ -410,9 +410,7 @@ public class DefaultRecordMapper<R extends Record, E> implements RecordMapper<R,
// [#1340] Allow for using non-public default constructors
try {
MutablePOJOMapper m = instance != null
? new MutablePOJOMapper(null, instance)
: new MutablePOJOMapper(new ConstructorCall<>(accessible(type.getDeclaredConstructor())), null);
MutablePOJOMapper m = new MutablePOJOMapper(new ConstructorCall<>(accessible(type.getDeclaredConstructor())), instance);
// [#10194] Check if the POJO is really mutable. There might as well
// be a no-args constructor for other reasons, e.g. when