mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
Merge pull request #99 from dscho/fix-get-annotation
Fix NPE in Field#getAnnotation
This commit is contained in:
@ -304,7 +304,7 @@ public class Field<T> extends AccessibleObject {
|
||||
}
|
||||
|
||||
public <T extends Annotation> T getAnnotation(Class<T> class_) {
|
||||
if (vmField.addendum.annotationTable != null) {
|
||||
if (vmField.addendum != null && vmField.addendum.annotationTable != null) {
|
||||
Object[] table = (Object[]) vmField.addendum.annotationTable;
|
||||
for (int i = 0; i < table.length; ++i) {
|
||||
Object[] a = (Object[]) table[i];
|
||||
|
Reference in New Issue
Block a user