Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVikas Chandra2019-01-25 11:13:00 +0000
committerVikas Chandra2019-01-29 05:09:12 +0000
commit60010dfa88a963a8b16209676ac7277e5606027e (patch)
tree19fad195c21779830317e90a199df7ba1358ff8e
parentbc73025863c7d8e779a315c550be270ffbbf51d1 (diff)
downloadeclipse.jdt.core-60010dfa88a963a8b16209676ac7277e5606027e.tar.gz
eclipse.jdt.core-60010dfa88a963a8b16209676ac7277e5606027e.tar.xz
eclipse.jdt.core-60010dfa88a963a8b16209676ac7277e5606027e.zip
Bug 542560 - [12][completion] Code completion Support for Switch
Expressions Change-Id: I18f7583257ccf49c2128787667b1d3dd35b328cc Signed-off-by: Vikas Chandra <Vikas.Chandra@in.ibm.com>
-rw-r--r--org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
index 11b81da1b2..4e35ca3ea9 100644
--- a/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
+++ b/org.eclipse.jdt.core/codeassist/org/eclipse/jdt/internal/codeassist/impl/AssistParser.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2018 IBM Corporation and others.
+ * Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
@@ -512,6 +512,8 @@ protected boolean triggerRecoveryUponLambdaClosure(Statement statement, boolean
if (this.elementKindStack[i] != K_LAMBDA_EXPRESSION_DELIMITER)
continue;
LambdaExpression expression = (LambdaExpression) this.elementObjectInfoStack[i];
+ if (expression == null)
+ return false;
if (expression.sourceStart >= statementStart && expression.sourceEnd <= statementEnd) {
this.elementPtr = i - 1;
lambdaClosed = true;

Back to the top