EA-77459 - NPE: RefactoringChangeUtil.getTypeByExpression

This commit is contained in:
Anna Kozlova
2016-01-26 17:30:03 +03:00
parent 3432ad8fa0
commit 1b3ee14efb
@@ -46,7 +46,7 @@ public class RefactoringChangeUtil {
}
public static PsiType getTypeByExpression(PsiExpression expr) {
PsiType type = expr.getType();
PsiType type = expr != null ? expr.getType() : null;
if (type == null) {
if (expr instanceof PsiArrayInitializerExpression) {
PsiExpression[] initializers = ((PsiArrayInitializerExpression)expr).getInitializers();