mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-26 19:06:24 +07:00
unchecked cast warning: missed captured wildcards (IDEA-158080); reifiable captured wildcard type
This commit is contained in:
+7
@@ -74,6 +74,10 @@ public class JavaGenericsUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (type instanceof PsiCapturedWildcardType) {
|
||||
return isReifiableType(((PsiCapturedWildcardType)type).getUpperBound());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -127,6 +131,9 @@ public class JavaGenericsUtil {
|
||||
if (castType instanceof PsiClassType) {
|
||||
final PsiClassType castClassType = (PsiClassType)castType;
|
||||
operandType = operandType.getDeepComponentType();
|
||||
if (operandType instanceof PsiCapturedWildcardType) {
|
||||
operandType = ((PsiCapturedWildcardType)operandType).getUpperBound();
|
||||
}
|
||||
|
||||
if (!(operandType instanceof PsiClassType)) return false;
|
||||
final PsiClassType operandClassType = (PsiClassType)operandType;
|
||||
|
||||
Reference in New Issue
Block a user