mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
redundant casts: exclude casts from primitive types in synchronized stms (IDEA-58637 )
This commit is contained in:
@@ -353,6 +353,8 @@ public class RedundantCastUtil {
|
||||
//branches need to be of the same type
|
||||
if (!Comparing.equal(operand.getType(), ((PsiConditionalExpression)parent).getType())) return;
|
||||
}
|
||||
} else if (parent instanceof PsiSynchronizedStatement && (expr instanceof PsiExpression && ((PsiExpression)expr).getType() instanceof PsiPrimitiveType)) {
|
||||
return;
|
||||
}
|
||||
processAlreadyHasTypeCast(typeCast);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user