The javadoc of ClassUtils.getAnnotatedFields(...) says it returns A new list containing all fields with the requested annotation. However, it sometimes returns a new list, and sometimes the cached list.
public static <A extends Annotation> List<Field> getAnnotatedFields(
final Class<?> c, final Class<A> annotationClass)
{
List<Field> fields = fieldCache.getList(c, annotationClass);
if (fields == null) {
fields = new ArrayList<>();
getAnnotatedFields(c, annotationClass, fields);
}
return fields;
}
Is this an oversight or intended behaviour?
(same for getAnnotatedMethods(...))
The javadoc of
ClassUtils.getAnnotatedFields(...)says it returns A new list containing all fields with the requested annotation. However, it sometimes returns a new list, and sometimes the cached list.Is this an oversight or intended behaviour?
(same for
getAnnotatedMethods(...))