diff --git a/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileWrapper.java b/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileWrapper.java index 4554cbe89dc2..66a2f9a1c2d0 100644 --- a/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileWrapper.java +++ b/platform/analysis-impl/src/com/intellij/codeInspection/ex/InspectionProfileWrapper.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -24,7 +24,7 @@ import com.intellij.openapi.progress.ProgressManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.util.Key; import com.intellij.psi.PsiElement; -import com.intellij.util.Function; +import com.intellij.util.NotNullFunction; import gnu.trove.THashSet; import org.jetbrains.annotations.NotNull; @@ -44,8 +44,7 @@ public class InspectionProfileWrapper { * I.e. given strategy (if any) receives {@link InspectionProfileWrapper} object that is going to be used so far and returns * {@link InspectionProfileWrapper} object that should be used later. */ - public static final Key> CUSTOMIZATION_KEY - = Key.create("Inspection Profile Wrapper Customization"); + public static final Key> CUSTOMIZATION_KEY = Key.create("Inspection Profile Wrapper Customization"); protected final InspectionProfile myProfile; public InspectionProfileWrapper(@NotNull InspectionProfile profile) { diff --git a/spellchecker/src/com/intellij/spellchecker/ui/SpellCheckingEditorCustomization.java b/spellchecker/src/com/intellij/spellchecker/ui/SpellCheckingEditorCustomization.java index 4f9ccdee0d8d..d64335ec7deb 100644 --- a/spellchecker/src/com/intellij/spellchecker/ui/SpellCheckingEditorCustomization.java +++ b/spellchecker/src/com/intellij/spellchecker/ui/SpellCheckingEditorCustomization.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2015 JetBrains s.r.o. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -30,7 +30,7 @@ import com.intellij.psi.PsiElement; import com.intellij.psi.PsiFile; import com.intellij.spellchecker.inspections.SpellCheckingInspection; import com.intellij.ui.SimpleEditorCustomization; -import com.intellij.util.Function; +import com.intellij.util.NotNullFunction; import com.intellij.util.containers.WeakHashMap; import org.jetbrains.annotations.NotNull; @@ -104,7 +104,7 @@ public class SpellCheckingEditorCustomization extends SimpleEditorCustomization return; } - Function strategy = file.getUserData(InspectionProfileWrapper.CUSTOMIZATION_KEY); + NotNullFunction strategy = file.getUserData(InspectionProfileWrapper.CUSTOMIZATION_KEY); if (strategy == null) { file.putUserData(InspectionProfileWrapper.CUSTOMIZATION_KEY, strategy = new MyInspectionProfileStrategy()); } @@ -126,12 +126,13 @@ public class SpellCheckingEditorCustomization extends SimpleEditorCustomization } } - private static class MyInspectionProfileStrategy implements Function { + private static class MyInspectionProfileStrategy implements NotNullFunction { private final Map myWrappers = new WeakHashMap(); private boolean myUseSpellCheck; + @NotNull @Override public InspectionProfileWrapper fun(InspectionProfileWrapper inspectionProfileWrapper) { if (!READY) {