Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorManoj Palat2019-02-15 10:05:16 +0000
committerManoj Palat2019-02-15 10:05:16 +0000
commit75678f56c16789d0e34a7ff19deb7688059a0f16 (patch)
treee16c6c0e7078d03d5d258cf946351ae81569ed0c /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
parent0dafaea9437765af6a924b8fc8f523beb778e26f (diff)
downloadeclipse.jdt.core-75678f56c16789d0e34a7ff19deb7688059a0f16.tar.gz
eclipse.jdt.core-75678f56c16789d0e34a7ff19deb7688059a0f16.tar.xz
eclipse.jdt.core-75678f56c16789d0e34a7ff19deb7688059a0f16.zip
Bug 544428 - [12][compiler] SwitchExpression.check_nonconstant_int
throws NPE
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
index 05617f3b7d..c763fa89b6 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java
@@ -552,7 +552,7 @@ public class SwitchExpression extends SwitchStatement implements IPolyExpression
for (int i = 0, l = this.resultExpressions.size(); i < l; ++i) {
Expression e = this.resultExpressions.get(i);
TypeBinding type = this.originalValueResultExpressionTypes[i];
- if (type.id == T_int && e.constant == Constant.NotAConstant)
+ if (type != null && type.id == T_int && e.constant == Constant.NotAConstant)
return TypeBinding.INT;
}
return null;

Back to the top