Do not warn for List being deprecated by default

This commit is contained in:
Juan Martín Sotuyo Dodero
2024-04-19 09:02:16 -03:00
parent 1231a54300
commit 346d7fd0dc

View File

@ -106,16 +106,11 @@ public final class Attribute {
return null;
} else {
DeprecatedAttribute annot = method.getAnnotation(DeprecatedAttribute.class);
String result = annot != null
return annot != null
? annot.replaceWith()
: method.isAnnotationPresent(Deprecated.class)
? DeprecatedAttribute.NO_REPLACEMENT
: null;
if (result == null && List.class.isAssignableFrom(method.getReturnType())) {
// Lists are generally deprecated, see #2451
result = DeprecatedAttribute.NO_REPLACEMENT;
}
return result;
}
}