Make sure you have "Type may be weakened" On, with option "Use righthand type as weakest type" On.
Provide dummy code like:
import org.jetbrains.annotations.NonNls;
public class RightHandIterator {
publicstaticint exp(Iterable<String> list) {
int i = 0;
for (@NonNls String s: list) {
if ("some".equals(s)) {
i++;
}
}
return i;
}
}
Inspection reports s: "Type of parameter may be weakened to Object".
But it seems that with "Use righthand type" option it should not be reported: the type of collection elements is explicitly set to String.
Description
Make sure you have "Type may be weakened" On, with option "Use righthand type as weakest type" On.
Provide dummy code like:
import org.jetbrains.annotations.NonNls;
public class RightHandIterator {
publicstaticint exp(Iterable<String> list) {
int i = 0;
for (@NonNls String s: list) {
if ("some".equals(s)) {
i++;
}
}
return i;
}
}
Inspection reports s: "Type of parameter may be weakened to Object".
But it seems that with "Use righthand type" option it should not be reported: the type of collection elements is explicitly set to String.