mirror of https://github.com/apache/openjpa.git
If we don't know the access type for a class when parsing, first check for a superclass and default to that class' access type.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@501255 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
62358d36d1
commit
24cf4c939e
|
@ -742,9 +742,17 @@ public class XMLPersistenceMetaDataParser
|
|||
return false;
|
||||
}
|
||||
|
||||
// if we don't know the access type, check for a superclass
|
||||
int defaultAccess = _access;
|
||||
if (defaultAccess == ClassMetaData.ACCESS_UNKNOWN) {
|
||||
ClassMetaData sup = repos.getCachedMetaData(_cls.getSuperclass());
|
||||
if (sup != null)
|
||||
defaultAccess = sup.getAccessType();
|
||||
}
|
||||
|
||||
if (meta == null) {
|
||||
// add metadata for this type
|
||||
int access = toAccessType(attrs.getValue("access"), _access);
|
||||
int access = toAccessType(attrs.getValue("access"), defaultAccess);
|
||||
meta = repos.addMetaData(_cls, access);
|
||||
meta.setEnvClassLoader(_envLoader);
|
||||
meta.setSourceMode(MODE_NONE);
|
||||
|
|
Loading…
Reference in New Issue