mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
NPE
(cherry picked from commit 4f8711f13c3a3ebb847d879c0347013397792e84)
This commit is contained in:
+3
-1
@@ -144,6 +144,7 @@ public class PsiPolyExpressionUtil {
|
||||
if (expr instanceof PsiParenthesizedExpression) {
|
||||
return isBooleanOrNumeric(((PsiParenthesizedExpression)expr).getExpression());
|
||||
}
|
||||
if (expr == null) return null;
|
||||
PsiType type = null;
|
||||
if (expr instanceof PsiNewExpression || hasStandaloneForm(expr)) {
|
||||
type = expr.getType();
|
||||
@@ -160,7 +161,8 @@ public class PsiPolyExpressionUtil {
|
||||
final PsiExpression elseExpression = ((PsiConditionalExpression)expr).getElseExpression();
|
||||
final ConditionalKind thenKind = isBooleanOrNumeric(thenExpression);
|
||||
final ConditionalKind elseKind = isBooleanOrNumeric(elseExpression);
|
||||
if (thenKind == elseKind) return thenKind;
|
||||
if (thenKind == elseKind || elseKind == null) return thenKind;
|
||||
if (thenKind == null) return elseKind;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user