mirror of https://github.com/apache/openjpa.git
OPENJPA-42 Check for the existence of superclass metadata in getSuperclassField so we throw a better exception than an NPE if it doesn't exist.
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@442030 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
3b2f6a720d
commit
25e80a994e
|
@ -810,8 +810,9 @@ public class ClassMetaData
|
|||
* Return the superclass copy of the given field.
|
||||
*/
|
||||
protected FieldMetaData getSuperclassField(FieldMetaData supField) {
|
||||
FieldMetaData fmd = getPCSuperclassMetaData().
|
||||
getField(supField.getName());
|
||||
ClassMetaData sm = getPCSuperclassMetaData();
|
||||
FieldMetaData fmd = sm == null ? null : sm.getField(supField.getName());
|
||||
|
||||
if (fmd == null || fmd.getManagement() != fmd.MANAGE_PERSISTENT)
|
||||
throw new MetaDataException(_loc.get("unmanaged-sup-field",
|
||||
supField, this));
|
||||
|
|
Loading…
Reference in New Issue