mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IG: use isAssignableFrom() with substitutor instead of convertible check
This commit is contained in:
+2
-1
@@ -129,7 +129,8 @@ public class AtomicFieldUpdaterIssuesInspection extends BaseInspection {
|
||||
}
|
||||
final PsiClassObjectAccessExpression objectAccessExpression = (PsiClassObjectAccessExpression)argument2;
|
||||
final PsiType type = objectAccessExpression.getOperand().getType();
|
||||
if (!TypeUtils.areConvertible(type, field.getType())) {
|
||||
final PsiType substFieldType = classType.resolveGenerics().getSubstitutor().substitute(field.getType());
|
||||
if (!substFieldType.isAssignableFrom(type)) {
|
||||
registerError(lastArgument, InspectionGadgetsBundle.message("field.incorrect.type.problem.descriptor",
|
||||
fieldName, type.getPresentableText()));
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user