DATACMNS-26 - Persistent constructor now detects non-public constructor.
This commit is contained in:
@@ -295,7 +295,7 @@ public class BasicMappingContext implements MappingContext, InitializingBean, Ap
|
||||
// Find the right constructor
|
||||
PreferredConstructor<T> preferredConstructor = null;
|
||||
|
||||
for (Constructor<?> constructor : type.getConstructors()) {
|
||||
for (Constructor<?> constructor : type.getDeclaredConstructors()) {
|
||||
if (constructor.getParameterTypes().length != 0) {
|
||||
// Non-no-arg constructor
|
||||
if (null == preferredConstructor || constructor.isAnnotationPresent(PersistenceConstructor.class)) {
|
||||
|
||||
Reference in New Issue
Block a user