am 631565ab: Merge "Change getDeclaredFieldsUnchecked call to new return value"
* commit '631565abd6cadd65befe197afa7bac0d44f70fb2': Change getDeclaredFieldsUnchecked call to new return value
This commit is contained in:
@@ -1005,30 +1005,22 @@ public class ViewDebug {
|
|||||||
return fields;
|
return fields;
|
||||||
}
|
}
|
||||||
|
|
||||||
final ArrayList<Field> declaredFields = new ArrayList();
|
|
||||||
klass.getDeclaredFieldsUnchecked(false, declaredFields);
|
|
||||||
|
|
||||||
final ArrayList<Field> foundFields = new ArrayList<Field>();
|
|
||||||
final int count = declaredFields.size();
|
|
||||||
for (int i = 0; i < count; i++) {
|
|
||||||
final Field field = declaredFields.get(i);
|
|
||||||
|
|
||||||
// Ensure the field type can be resolved.
|
|
||||||
try {
|
try {
|
||||||
field.getType();
|
final Field[] declaredFields = klass.getDeclaredFieldsUnchecked(false);
|
||||||
} catch (NoClassDefFoundError e) {
|
final ArrayList<Field> foundFields = new ArrayList<Field>();
|
||||||
continue;
|
for (final Field field : declaredFields) {
|
||||||
}
|
// Fields which can't be resolved have a null type.
|
||||||
|
if (field.getType() != null && field.isAnnotationPresent(ExportedProperty.class)) {
|
||||||
if (field.isAnnotationPresent(ExportedProperty.class)) {
|
|
||||||
field.setAccessible(true);
|
field.setAccessible(true);
|
||||||
foundFields.add(field);
|
foundFields.add(field);
|
||||||
sAnnotations.put(field, field.getAnnotation(ExportedProperty.class));
|
sAnnotations.put(field, field.getAnnotation(ExportedProperty.class));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fields = foundFields.toArray(new Field[foundFields.size()]);
|
fields = foundFields.toArray(new Field[foundFields.size()]);
|
||||||
map.put(klass, fields);
|
map.put(klass, fields);
|
||||||
|
} catch (NoClassDefFoundError e) {
|
||||||
|
throw new AssertionError(e);
|
||||||
|
}
|
||||||
|
|
||||||
return fields;
|
return fields;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user