mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
suspicious call should ignore captured wildcard types assignments (IDEADEV-39955)
This commit is contained in:
+3
@@ -143,6 +143,9 @@ public class SuspiciousCollectionsMethodCallsInspection extends BaseLocalInspect
|
||||
PsiType typeParamMapping = substitutor.substitute(typeParameter);
|
||||
if (typeParamMapping == null) return;
|
||||
String message = null;
|
||||
if (typeParamMapping instanceof PsiCapturedWildcardType) {
|
||||
typeParamMapping = ((PsiCapturedWildcardType)typeParamMapping).getWildcard();
|
||||
}
|
||||
if (!typeParamMapping.isAssignableFrom(argType)) {
|
||||
if (typeParamMapping.isConvertibleFrom(argType)) {
|
||||
if (REPORT_CONVERTIBLE_METHOD_CALLS) {
|
||||
|
||||
Reference in New Issue
Block a user