mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-02-04 15:06:56 +07:00
[spellchecker] fix IJPL-772
Relaxed nullability requirement for DictionaryLayer in SaveTo, it already handles null gracefully, and, unfortunately, it is valid situation when we can't find layer by name, since it is stored as localized string value. GitOrigin-RevId: 46442994aff7248c198d8d23ee0f3a9490521a9f
This commit is contained in:
committed by
intellij-monorepo-bot
parent
a04f5d5dde
commit
a280b5208f
@@ -39,7 +39,7 @@ public final class SaveTo implements SpellCheckerQuickFix, LowPriorityAction {
|
||||
myWord = word;
|
||||
}
|
||||
|
||||
public SaveTo(String word, @NotNull DictionaryLayer layer) {
|
||||
public SaveTo(String word, @Nullable DictionaryLayer layer) {
|
||||
myWord = word;
|
||||
myLayer = layer;
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ public class SpellcheckingStrategy {
|
||||
|
||||
final SpellCheckerSettings settings = SpellCheckerSettings.getInstance(element.getProject());
|
||||
if (settings.isUseSingleDictionaryToSave()) {
|
||||
result.add(new SaveTo(typo, Objects.requireNonNull(DictionaryLayersProvider.getLayer(element.getProject(), settings.getDictionaryToSave()))));
|
||||
result.add(new SaveTo(typo, DictionaryLayersProvider.getLayer(element.getProject(), settings.getDictionaryToSave())));
|
||||
return result.toArray(LocalQuickFix.EMPTY_ARRAY);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user