Merge "Change getDeclaredFieldsUnchecked call to new return value"
This commit is contained in:
@@ -1005,31 +1005,23 @@ public class ViewDebug {
|
||||
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 {
|
||||
field.getType();
|
||||
} catch (NoClassDefFoundError e) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (field.isAnnotationPresent(ExportedProperty.class)) {
|
||||
field.setAccessible(true);
|
||||
foundFields.add(field);
|
||||
sAnnotations.put(field, field.getAnnotation(ExportedProperty.class));
|
||||
try {
|
||||
final Field[] declaredFields = klass.getDeclaredFieldsUnchecked(false);
|
||||
final ArrayList<Field> foundFields = new ArrayList<Field>();
|
||||
for (final Field field : declaredFields) {
|
||||
// Fields which can't be resolved have a null type.
|
||||
if (field.getType() != null && field.isAnnotationPresent(ExportedProperty.class)) {
|
||||
field.setAccessible(true);
|
||||
foundFields.add(field);
|
||||
sAnnotations.put(field, field.getAnnotation(ExportedProperty.class));
|
||||
}
|
||||
}
|
||||
fields = foundFields.toArray(new Field[foundFields.size()]);
|
||||
map.put(klass, fields);
|
||||
} catch (NoClassDefFoundError e) {
|
||||
throw new AssertionError(e);
|
||||
}
|
||||
|
||||
fields = foundFields.toArray(new Field[foundFields.size()]);
|
||||
map.put(klass, fields);
|
||||
|
||||
return fields;
|
||||
}
|
||||
|
||||
@@ -1651,4 +1643,4 @@ public class ViewDebug {
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user