From 3098a65b9a67893743d05d9de288c30322997dac Mon Sep 17 00:00:00 2001 From: peter Date: Mon, 18 Apr 2011 16:24:47 +0200 Subject: [PATCH] EA-27034 null completion process during completion --- .../codeInsight/completion/impl/CompletionServiceImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java index 0f5daca49405..7afb1e52da5e 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/impl/CompletionServiceImpl.java @@ -85,7 +85,9 @@ public class CompletionServiceImpl extends CompletionService{ final String prefix = CompletionData.findPrefixStatic(position, parameters.getOffset()); final String textBeforePosition = parameters.getPosition().getContainingFile().getText().substring(0, parameters.getOffset()); CompletionProgressIndicator process = myCurrentCompletion; - LOG.assertTrue(process != null, "createResultSet may be invoked only during completion"); + if (process == null) { + throw new AssertionError("createResultSet may be invoked only during completion: " + ourPhase + "; set at " + ourPhaseTrace); + } CamelHumpMatcher matcher = new CamelHumpMatcher(prefix, true, parameters.relaxMatching()); CompletionSorterImpl sorter = defaultSorter(parameters, matcher); return new CompletionResultSetImpl(consumer, textBeforePosition, matcher, contributor,parameters, sorter, process, null);