diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java index e9fa6d015363..90ffa0ab8fcf 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/analysis/HighlightMethodUtil.java @@ -544,7 +544,7 @@ public class HighlightMethodUtil { PsiMethod method = methodCandidate.getElement(); PsiParameter[] parameters = method.getParameterList().getParameters(); PsiSubstitutor substitutor = methodCandidate.getSubstitutor(); - @NonNls String ms = "" + method.getName() + ""; + @NonNls @Language("HTML") String ms = "" + method.getName() + ""; for (int j = 0; j < parameters.length; j++) { PsiParameter parameter = parameters[j]; diff --git a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SideEffectWarningDialog.java b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SideEffectWarningDialog.java index e9717b6eb412..8da93c134c2b 100644 --- a/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SideEffectWarningDialog.java +++ b/java/java-impl/src/com/intellij/codeInsight/daemon/impl/quickfix/SideEffectWarningDialog.java @@ -36,7 +36,6 @@ public class SideEffectWarningDialog extends DialogWrapper { private final String myBeforeText; private final String myAfterText; private final boolean myCanCopeWithSideEffects; - private AbstractAction myMakeStmtAction; private AbstractAction myRemoveAllAction; private AbstractAction myCancelAllAction; public static final int MAKE_STATEMENT = 1; @@ -71,7 +70,7 @@ public class SideEffectWarningDialog extends DialogWrapper { }; actions.add(myRemoveAllAction); if (myCanCopeWithSideEffects) { - myMakeStmtAction = new AbstractAction() { + AbstractAction makeStmtAction = new AbstractAction() { { UIUtil.setActionNameAndMnemonic(QuickFixBundle.message("side.effect.action.transform"), this); } @@ -80,9 +79,8 @@ public class SideEffectWarningDialog extends DialogWrapper { public void actionPerformed(ActionEvent e) { close(MAKE_STATEMENT); } - }; - actions.add(myMakeStmtAction); + actions.add(makeStmtAction); } myCancelAllAction = new AbstractAction() { { diff --git a/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationProcessor.java b/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationProcessor.java index e75178e77f0c..d0848887c4f4 100644 --- a/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationProcessor.java +++ b/java/java-impl/src/com/intellij/refactoring/typeMigration/TypeMigrationProcessor.java @@ -37,6 +37,7 @@ import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; public class TypeMigrationProcessor extends BaseRefactoringProcessor { @@ -132,7 +133,7 @@ public class TypeMigrationProcessor extends BaseRefactoringProcessor { text = "method \'" + ((PsiMethod)myRoot[0]).getName() + "\' return"; } else { - text = myRoot.toString(); + text = Arrays.toString(myRoot); } Content content = UsageViewManager.getInstance(myProject) .addContent("Migrate Type of " + diff --git a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java index 2a9a33c142df..9b39245a44a6 100644 --- a/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java +++ b/platform/lang-impl/src/com/intellij/util/indexing/FileBasedIndex.java @@ -499,9 +499,6 @@ public class FileBasedIndex implements ApplicationComponent { keyDescriptor.save(out, key); } } - catch (IOException e) { - throw e; - } catch (IllegalArgumentException e) { throw new IOException("Error saving data for index " + indexId, e); } @@ -517,9 +514,6 @@ public class FileBasedIndex implements ApplicationComponent { } return list; } - catch (IOException e) { - throw e; - } catch (IllegalArgumentException e) { throw new IOException("Error reading data for index " + indexId, e); } diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java index 6ae7e4c2ec0a..5ad9c5efe6d9 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/impl/EditorImpl.java @@ -192,8 +192,6 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi private static final int MOUSE_SELECTION_STATE_WORD_SELECTED = 1; private static final int MOUSE_SELECTION_STATE_LINE_SELECTED = 2; - private final MarkupModelListener myMarkupModelListener; - private EditorHighlighter myHighlighter; private final TextDrawingCallback myTextDrawingCallback = new MyTextDrawingCallback(); @@ -306,7 +304,7 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi } myMouseMotionListeners = ContainerUtil.createEmptyCOWList(); - myMarkupModelListener = new MarkupModelListener() { + MarkupModelListener markupModelListener = new MarkupModelListener() { @Override public void afterAdded(@NotNull RangeHighlighterEx highlighter) { attributesChanged(highlighter); @@ -341,8 +339,8 @@ public final class EditorImpl extends UserDataHolderBase implements EditorEx, Hi } }; - ((MarkupModelEx)DocumentMarkupModel.forDocument(myDocument, myProject, true)).addMarkupModelListener(myCaretModel, myMarkupModelListener); - ((MarkupModelEx)getMarkupModel()).addMarkupModelListener(myCaretModel, myMarkupModelListener); + ((MarkupModelEx)DocumentMarkupModel.forDocument(myDocument, myProject, true)).addMarkupModelListener(myCaretModel, markupModelListener); + ((MarkupModelEx)getMarkupModel()).addMarkupModelListener(myCaretModel, markupModelListener); myDocument.addDocumentListener(myFoldingModel,myCaretModel); myDocument.addDocumentListener(myCaretModel,myCaretModel); diff --git a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java index 14b31a450adc..7d36e83559bc 100644 --- a/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java +++ b/plugins/IntelliLang/src/org/intellij/plugins/intelliLang/InjectionsSettingsUI.java @@ -930,9 +930,7 @@ public class InjectionsSettingsUI implements SearchableConfigurable.Parent, NonD @Override public boolean equals(final BaseInjection o1, final BaseInjection o2) { - if (!o1.sameLanguageParameters(o2)) return false; - if (!o1.getInjectionPlaces().equals(o2.getInjectionPlaces())) return false; - return true; + return o1.sameLanguageParameters(o2) && Arrays.equals(o1.getInjectionPlaces(), o2.getInjectionPlaces()); } } diff --git a/plugins/devkit/src/projectRoots/IdeaJdk.java b/plugins/devkit/src/projectRoots/IdeaJdk.java index 0f6c318daede..7dad1832aa84 100644 --- a/plugins/devkit/src/projectRoots/IdeaJdk.java +++ b/plugins/devkit/src/projectRoots/IdeaJdk.java @@ -156,9 +156,6 @@ public class IdeaJdk extends SdkType implements JavaSdkType { else if (new File(sdkHome, "lib/webide.jar").exists()) { productName = "WebStorm/PhpStorm "; } - else if (new File(sdkHome, "lib/webide.jar").exists()) { - productName = "WebStorm/PhpStorm "; - } else { productName = "IDEA "; } diff --git a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/encoding/XmlEncodingReference.java b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/encoding/XmlEncodingReference.java index d077d49a2087..5de454c9b173 100644 --- a/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/encoding/XmlEncodingReference.java +++ b/xml/impl/src/com/intellij/codeInsight/daemon/impl/analysis/encoding/XmlEncodingReference.java @@ -66,6 +66,7 @@ public class XmlEncodingReference implements PsiReference, EmptyResolveMessagePr } public String getUnresolvedMessagePattern() { + //noinspection UnresolvedPropertyKey return XmlErrorMessages.message("unknown.encoding.0"); }