diff options
author | Manoj Palat | 2019-02-15 10:05:16 +0000 |
---|---|---|
committer | Manoj Palat | 2019-02-15 10:05:16 +0000 |
commit | 75678f56c16789d0e34a7ff19deb7688059a0f16 (patch) | |
tree | e16c6c0e7078d03d5d258cf946351ae81569ed0c /org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/SwitchExpression.java | |
parent | 0dafaea9437765af6a924b8fc8f523beb778e26f (diff) | |
download | eclipse.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.java | 2 |
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; |