mirror of https://github.com/apache/openjpa.git
Fixed getMethodDescriptors to not try to create a MethodDescriptor for a non-existant method (which would cause an NPE).
git-svn-id: https://svn.apache.org/repos/asf/incubator/openjpa/trunk@443524 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
47edcb8edc
commit
20e0762e43
|
@ -374,8 +374,12 @@ public class ConfigurationImpl
|
||||||
PropertyDescriptor[] pds = getPropertyDescriptors();
|
PropertyDescriptor[] pds = getPropertyDescriptors();
|
||||||
_mds = new MethodDescriptor[pds.length * 2];
|
_mds = new MethodDescriptor[pds.length * 2];
|
||||||
for (int i = 0; i < pds.length; i++) {
|
for (int i = 0; i < pds.length; i++) {
|
||||||
_mds[i * 2] = new MethodDescriptor(pds[i].getWriteMethod());
|
Method write = pds[i].getWriteMethod();
|
||||||
_mds[(i * 2) + 1] = new MethodDescriptor(pds[i].getReadMethod());
|
if (write != null)
|
||||||
|
_mds[i * 2] = new MethodDescriptor(write);
|
||||||
|
Method read = pds[i].getReadMethod();
|
||||||
|
if (read != null)
|
||||||
|
_mds[(i * 2) + 1] = new MethodDescriptor(read);
|
||||||
}
|
}
|
||||||
return _mds;
|
return _mds;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue