Example:
public static int sumLengths(List<? extends String> list) {
int total = 0;
for(String s : list) total += s.length();
return total;
}
Problem because:
Since a final class has no subclasses this could equally well be written as:
public static int sumLengths(List<String> list) {
int total = 0;
for(String s : list) total += s.length();
return total;
}
Severity: Minor. Code is less clear than it could be.