DATACMNS-26 - Persistent constructor now detects non-public constructor.

This commit is contained in:
Oliver Gierke
2011-03-29 19:19:23 +02:00
parent 95ff87e959
commit 6bb0923c14

View File

@@ -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)) {