I have a method in a class which takes ‘List’ type parameter. When I run the spotbugs check it is returning below error (overly concrete parameter). Though the given method uses list it is complaining about concrete parameter. Could some one please let me know what I am missing here.
.TestClass.transform(List): 1st parameter 'dtos' could be declared as java.lang.Iterable instead
[com.TestClass] At TestClass.java:[line 146] OCP_OVERLY_CONCRETE_PARAMETER
public void transform(final List<Dto1> dtos) { //line 145
for (final Dto1 dto : dtos) { //line 146
Dto2 dto2 = convert(dto);
..
}
}