summaryrefslogtreecommitdiff
path: root/spellchecker/src/com/intellij
diff options
context:
space:
mode:
Diffstat (limited to 'spellchecker/src/com/intellij')
-rw-r--r--spellchecker/src/com/intellij/spellchecker/quickfixes/DictionarySuggestionProvider.java3
-rw-r--r--spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java7
2 files changed, 5 insertions, 5 deletions
diff --git a/spellchecker/src/com/intellij/spellchecker/quickfixes/DictionarySuggestionProvider.java b/spellchecker/src/com/intellij/spellchecker/quickfixes/DictionarySuggestionProvider.java
index d358990af876..08086e1a6326 100644
--- a/spellchecker/src/com/intellij/spellchecker/quickfixes/DictionarySuggestionProvider.java
+++ b/spellchecker/src/com/intellij/spellchecker/quickfixes/DictionarySuggestionProvider.java
@@ -20,6 +20,7 @@ import com.intellij.psi.PsiNamedElement;
import com.intellij.psi.codeStyle.SuggestedNameInfo;
import com.intellij.refactoring.rename.PreferrableNameSuggestionProvider;
import com.intellij.spellchecker.SpellCheckerManager;
+import com.intellij.util.containers.ContainerUtil;
import java.util.Set;
@@ -54,7 +55,7 @@ public class DictionarySuggestionProvider extends PreferrableNameSuggestionProvi
SpellCheckerManager manager = SpellCheckerManager.getInstance(element.getProject());
- result.addAll(manager.getSuggestions(text));
+ ContainerUtil.addAllNotNull(result, manager.getSuggestions(text));
return SuggestedNameInfo.NULL_INFO;
}
}
diff --git a/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java b/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
index eb84d239336f..08956f481d9c 100644
--- a/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
+++ b/spellchecker/src/com/intellij/spellchecker/state/CachedDictionaryState.java
@@ -20,9 +20,8 @@ import com.intellij.spellchecker.dictionary.EditableDictionary;
@State(
name = "CachedDictionaryState",
- roamingType = RoamingType.DISABLED,
- storages = {@Storage(
- file = StoragePathMacros.APP_CONFIG + "/cachedDictionary.xml")})
+ storages = {@Storage(file = StoragePathMacros.APP_CONFIG + "/cachedDictionary.xml", roamingType = RoamingType.DISABLED)}
+)
public class CachedDictionaryState extends DictionaryState implements PersistentStateComponent<DictionaryState> {
public static final String DEFAULT_NAME = "cached";
@@ -42,4 +41,4 @@ public class CachedDictionaryState extends DictionaryState implements Persistent
}
super.loadState(state);
}
-} \ No newline at end of file
+}