diff --git a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessEvents.java b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessEvents.java index 1878c77be165..65440ce516a2 100644 --- a/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessEvents.java +++ b/java/debugger/impl/src/com/intellij/debugger/engine/DebugProcessEvents.java @@ -279,9 +279,6 @@ public class DebugProcessEvents extends DebugProcessImpl { } }); } - catch (InternalException e) { - LOG.debug(e); - } catch (InterruptedException | ProcessCanceledException | VMDisconnectedException e) { throw e; } diff --git a/java/debugger/impl/src/com/intellij/debugger/impl/InvokeThread.java b/java/debugger/impl/src/com/intellij/debugger/impl/InvokeThread.java index e8bb348c2f18..c6256fd4323c 100644 --- a/java/debugger/impl/src/com/intellij/debugger/impl/InvokeThread.java +++ b/java/debugger/impl/src/com/intellij/debugger/impl/InvokeThread.java @@ -140,10 +140,7 @@ public abstract class InvokeThread { processEvent(myEvents.get()); } - catch (VMDisconnectedException ignored) { - break; - } - catch (EventQueueClosedException ignored) { + catch (VMDisconnectedException | EventQueueClosedException ignored) { break; } catch (ProcessCanceledException ignored) {} diff --git a/platform/bootstrap/src/com/intellij/ide/WindowsCommandLineProcessor.java b/platform/bootstrap/src/com/intellij/ide/WindowsCommandLineProcessor.java index a034a7d804b8..a2cea7ea68ef 100644 --- a/platform/bootstrap/src/com/intellij/ide/WindowsCommandLineProcessor.java +++ b/platform/bootstrap/src/com/intellij/ide/WindowsCommandLineProcessor.java @@ -22,9 +22,7 @@ public final class WindowsCommandLineProcessor { Method method = ourMainRunnerClass.getMethod("processWindowsLauncherCommandLine", String.class, String[].class); return (Integer)method.invoke(null, currentDirectory, args); } - catch (NoSuchMethodException ignored) { } - catch (InvocationTargetException ignored) { } - catch (IllegalAccessException ignored) { } + catch (NoSuchMethodException | IllegalAccessException | InvocationTargetException ignored) { } } return 1; } diff --git a/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java b/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java index 68c456b06d4e..dc5e8cdfd97b 100644 --- a/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java +++ b/platform/lang-impl/src/com/intellij/execution/dashboard/actions/ExecutorAction.java @@ -121,13 +121,10 @@ public abstract class ExecutorAction extends DumbAwareAction implements UpdateIn settings.checkSettings(null); return true; } - catch (IndexNotReadyException ex) { - return true; - } catch (RuntimeConfigurationError ex) { return false; } - catch (RuntimeConfigurationException ex) { + catch (IndexNotReadyException | RuntimeConfigurationException ex) { return true; } } diff --git a/platform/lang-impl/src/com/intellij/ide/projectView/impl/CompoundTreeStructureProvider.java b/platform/lang-impl/src/com/intellij/ide/projectView/impl/CompoundTreeStructureProvider.java index 836ea5208a1f..9c1ca24c607c 100644 --- a/platform/lang-impl/src/com/intellij/ide/projectView/impl/CompoundTreeStructureProvider.java +++ b/platform/lang-impl/src/com/intellij/ide/projectView/impl/CompoundTreeStructureProvider.java @@ -78,9 +78,7 @@ public final class CompoundTreeStructureProvider implements TreeStructureProvide Object data = provider.getData(selection, dataId); if (data != null) return data; } - catch (IndexNotReadyException ignore) { - } - catch (ProcessCanceledException ignore) { + catch (IndexNotReadyException | ProcessCanceledException ignore) { } catch (Exception exception) { LOG.warn("unexpected error in " + provider, exception); diff --git a/platform/lang-impl/src/com/intellij/openapi/editor/EditorMouseHoverPopupManager.java b/platform/lang-impl/src/com/intellij/openapi/editor/EditorMouseHoverPopupManager.java index 5bb919ae64d7..b55cd6490aac 100644 --- a/platform/lang-impl/src/com/intellij/openapi/editor/EditorMouseHoverPopupManager.java +++ b/platform/lang-impl/src/com/intellij/openapi/editor/EditorMouseHoverPopupManager.java @@ -564,9 +564,7 @@ public class EditorMouseHoverPopupManager implements Disposable { } } } - catch (IndexNotReadyException ignored) { - } - catch (ProcessCanceledException ignored) { + catch (IndexNotReadyException | ProcessCanceledException ignored) { } catch (Exception e) { LOG.warn(e); diff --git a/platform/platform-impl/src/com/intellij/ui/mac/touchbar/NST.java b/platform/platform-impl/src/com/intellij/ui/mac/touchbar/NST.java index 38bb60d6b4b4..3205dfb5260e 100644 --- a/platform/platform-impl/src/com/intellij/ui/mac/touchbar/NST.java +++ b/platform/platform-impl/src/com/intellij/ui/mac/touchbar/NST.java @@ -136,13 +136,7 @@ final class NST { platformWindow != null ? platformWindow.getClass() : "null"); } } - catch (NoSuchMethodException e) { - LOG.debug(e); - } - catch (IllegalAccessException e) { - LOG.debug(e); - } - catch (InvocationTargetException e) { + catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { LOG.debug(e); } } diff --git a/platform/platform-impl/src/com/intellij/ui/popup/async/AsyncPopupImpl.java b/platform/platform-impl/src/com/intellij/ui/popup/async/AsyncPopupImpl.java index 6fd5a8518762..73bc60049a93 100644 --- a/platform/platform-impl/src/com/intellij/ui/popup/async/AsyncPopupImpl.java +++ b/platform/platform-impl/src/com/intellij/ui/popup/async/AsyncPopupImpl.java @@ -66,10 +66,7 @@ public class AsyncPopupImpl extends WizardPopup implements Runnable { try { myCallBackParent.handleNextStep(myFuture.get(), myParentValue); } - catch (InterruptedException e) { - //ignore - } - catch (ExecutionException e) { + catch (InterruptedException | ExecutionException e) { //ignore } return; diff --git a/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/StructuralSearchDialog.java b/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/StructuralSearchDialog.java index 65b51f422001..dad1e51cdc87 100644 --- a/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/StructuralSearchDialog.java +++ b/platform/structuralsearch/source/com/intellij/structuralsearch/plugin/ui/StructuralSearchDialog.java @@ -920,11 +920,7 @@ public class StructuralSearchDialog extends DialogWrapper implements DocumentLis mySearchCriteriaEdit)); } } - catch (UnsupportedPatternException e) { - removeMatchHighlights(); - errors.add(new ValidationInfo(e.getMessage(), mySearchCriteriaEdit)); - } - catch (NoMatchFoundException e) { + catch (UnsupportedPatternException | NoMatchFoundException e) { removeMatchHighlights(); errors.add(new ValidationInfo(e.getMessage(), mySearchCriteriaEdit)); } @@ -932,10 +928,7 @@ public class StructuralSearchDialog extends DialogWrapper implements DocumentLis try { Replacer.checkReplacementPattern(getProject(), myConfiguration.getReplaceOptions()); } - catch (UnsupportedPatternException e) { - errors.add(new ValidationInfo(e.getMessage(), myReplaceCriteriaEdit)); - } - catch (MalformedPatternException e) { + catch (UnsupportedPatternException | MalformedPatternException e) { errors.add(new ValidationInfo(e.getMessage(), myReplaceCriteriaEdit)); } } diff --git a/platform/util/src/com/intellij/util/indexing/impl/MapReduceIndex.java b/platform/util/src/com/intellij/util/indexing/impl/MapReduceIndex.java index 03cdc11f2f39..367c779c27ed 100644 --- a/platform/util/src/com/intellij/util/indexing/impl/MapReduceIndex.java +++ b/platform/util/src/com/intellij/util/indexing/impl/MapReduceIndex.java @@ -243,10 +243,7 @@ public abstract class MapReduceIndex implements InvertedIndex< try { data = mapInput(inputId, content); } - catch (ProcessCanceledException e) { - throw e; - } - catch (MapReduceIndexMappingException e) { + catch (ProcessCanceledException | MapReduceIndexMappingException e) { throw e; } catch (Exception e) { diff --git a/plugins/git4idea/src/git4idea/config/GitExecutableManager.java b/plugins/git4idea/src/git4idea/config/GitExecutableManager.java index 74174dfc54ed..e8a7e4196381 100644 --- a/plugins/git4idea/src/git4idea/config/GitExecutableManager.java +++ b/plugins/git4idea/src/git4idea/config/GitExecutableManager.java @@ -222,10 +222,7 @@ public class GitExecutableManager { GitExecutable executable = getExecutable(project); return identifyVersion(executable); } - catch (ProcessCanceledException e) { - return null; - } - catch (GitVersionIdentificationException e) { + catch (ProcessCanceledException | GitVersionIdentificationException e) { return null; } }); @@ -238,10 +235,7 @@ public class GitExecutableManager { try { return identifyVersion(executable); } - catch (ProcessCanceledException e) { - return null; - } - catch (GitVersionIdentificationException e) { + catch (ProcessCanceledException | GitVersionIdentificationException e) { return null; } }); diff --git a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/CommonGradleProjectResolverExtension.java b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/CommonGradleProjectResolverExtension.java index 1598ff155cac..4b12bdc899fd 100644 --- a/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/CommonGradleProjectResolverExtension.java +++ b/plugins/gradle/src/org/jetbrains/plugins/gradle/service/project/CommonGradleProjectResolverExtension.java @@ -923,10 +923,7 @@ public final class CommonGradleProjectResolverExtension extends AbstractProjectR Object result = getDependencyModule.invoke(dependency); return (IdeaModule)result; } - catch (IllegalAccessException e) { - LOG.info("Failed to get dependency module for [" + dependency + "]", e); - } - catch (InvocationTargetException e) { + catch (IllegalAccessException | InvocationTargetException e) { LOG.info("Failed to get dependency module for [" + dependency + "]", e); } } diff --git a/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsBindingManager.java b/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsBindingManager.java index 924f99feddc0..c285cbaf145c 100644 --- a/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsBindingManager.java +++ b/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsBindingManager.java @@ -212,9 +212,7 @@ public final class FormsBindingManager extends FormsBuilder { return true; } } - catch (IOException ignore) { - } - catch (AlienFormFileException ignore) { + catch (IOException | AlienFormFileException ignore) { } } return false; diff --git a/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsInstrumenter.java b/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsInstrumenter.java index 3a8c6354ecca..562c3cb65789 100644 --- a/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsInstrumenter.java +++ b/plugins/ui-designer/jps-plugin/src/org/jetbrains/jps/uiDesigner/compiler/FormsInstrumenter.java @@ -148,12 +148,7 @@ public final class FormsInstrumenter extends FormsBuilder { // ignore non-IDEA forms continue; } - catch (UnexpectedFormElementException e) { - context.processMessage(new CompilerMessage(getPresentableName(), BuildMessage.Kind.ERROR, e.getMessage(), formFile.getPath())); - LOG.info(e); - continue; - } - catch (UIDesignerException e) { + catch (UnexpectedFormElementException | UIDesignerException e) { context.processMessage(new CompilerMessage(getPresentableName(), BuildMessage.Kind.ERROR, e.getMessage(), formFile.getPath())); LOG.info(e); continue; diff --git a/plugins/ui-designer/src/com/intellij/uiDesigner/Properties.java b/plugins/ui-designer/src/com/intellij/uiDesigner/Properties.java index 2159ae6fb6e9..a40a4048cf57 100644 --- a/plugins/ui-designer/src/com/intellij/uiDesigner/Properties.java +++ b/plugins/ui-designer/src/com/intellij/uiDesigner/Properties.java @@ -44,10 +44,7 @@ public final class Properties { loadState(JDOMUtil.load(inputStream)); } } - catch (JDOMException e) { - LOG.error(e); - } - catch (IOException e) { + catch (JDOMException | IOException e) { LOG.error(e); } } diff --git a/plugins/xslt-debugger/engine/impl/src/org/intellij/plugins/xsltDebugger/rt/engine/local/saxon9/Saxon9StyleFrame.java b/plugins/xslt-debugger/engine/impl/src/org/intellij/plugins/xsltDebugger/rt/engine/local/saxon9/Saxon9StyleFrame.java index 7d56d07a2b9f..61c8d4e97a3b 100644 --- a/plugins/xslt-debugger/engine/impl/src/org/intellij/plugins/xsltDebugger/rt/engine/local/saxon9/Saxon9StyleFrame.java +++ b/plugins/xslt-debugger/engine/impl/src/org/intellij/plugins/xsltDebugger/rt/engine/local/saxon9/Saxon9StyleFrame.java @@ -58,13 +58,11 @@ class Saxon9StyleFrame extends AbstractSaxon9Frame implements Debu new XObjectValue(variable.getValue(myTransformer, myCurrentNode)); variables.add(new VariableImpl(name, value, global, kind, variable.getSystemId(), variable.getLineNumber())); - } catch (TransformerException e) { - debug(e); - } catch (Debugger.EvaluationException e) { + } catch (TransformerException | Debugger.EvaluationException e) { debug(e); } } diff --git a/python/rest/src/com/jetbrains/rest/validation/RestAnnotatingVisitor.java b/python/rest/src/com/jetbrains/rest/validation/RestAnnotatingVisitor.java index e047dc2cb70d..11d09e4972fa 100644 --- a/python/rest/src/com/jetbrains/rest/validation/RestAnnotatingVisitor.java +++ b/python/rest/src/com/jetbrains/rest/validation/RestAnnotatingVisitor.java @@ -25,11 +25,7 @@ public class RestAnnotatingVisitor implements Annotator { try { annotator = cls.newInstance(); } - catch (InstantiationException e) { - LOGGER.error(e); - continue; - } - catch (IllegalAccessException e) { + catch (InstantiationException | IllegalAccessException e) { LOGGER.error(e); continue; } diff --git a/python/src/com/jetbrains/python/packaging/PyPackageManagerUI.java b/python/src/com/jetbrains/python/packaging/PyPackageManagerUI.java index f32eabb7c500..69cd99b524db 100644 --- a/python/src/com/jetbrains/python/packaging/PyPackageManagerUI.java +++ b/python/src/com/jetbrains/python/packaging/PyPackageManagerUI.java @@ -274,9 +274,6 @@ public final class PyPackageManagerUI { try { manager.install(null, myExtraArgs); } - catch (RunCanceledByUserException e) { - exceptions.add(e); - } catch (ExecutionException e) { exceptions.add(e); } diff --git a/python/src/com/jetbrains/python/validation/PyAnnotatingVisitor.java b/python/src/com/jetbrains/python/validation/PyAnnotatingVisitor.java index 650dfd9ff271..520944c91ff4 100644 --- a/python/src/com/jetbrains/python/validation/PyAnnotatingVisitor.java +++ b/python/src/com/jetbrains/python/validation/PyAnnotatingVisitor.java @@ -38,11 +38,7 @@ public class PyAnnotatingVisitor implements Annotator { try { annotator = (PyAnnotator)cls.newInstance(); } - catch (InstantiationException e) { - LOGGER.error(e); - continue; - } - catch (IllegalAccessException e) { + catch (InstantiationException | IllegalAccessException e) { LOGGER.error(e); continue; } diff --git a/xml/dom-openapi/src/com/intellij/util/xml/DomReflectionUtil.java b/xml/dom-openapi/src/com/intellij/util/xml/DomReflectionUtil.java index 5e1fd87defdd..4632fdf012c3 100644 --- a/xml/dom-openapi/src/com/intellij/util/xml/DomReflectionUtil.java +++ b/xml/dom-openapi/src/com/intellij/util/xml/DomReflectionUtil.java @@ -74,9 +74,6 @@ public final class DomReflectionUtil { catch (IllegalArgumentException e) { throw new RuntimeException("Calling method " + method + " on object " + object + " with arguments " + Arrays.asList(args), e); } - catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { final Throwable cause = e.getCause(); if (cause instanceof ProcessCanceledException) { diff --git a/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/IdeaDriver.java b/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/IdeaDriver.java index 419b640018d0..ae1bf6cc3e89 100644 --- a/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/IdeaDriver.java +++ b/xml/relaxng/src/org/intellij/plugins/relaxNG/convert/IdeaDriver.java @@ -162,13 +162,10 @@ public class IdeaDriver { errorHandler.error(e); } catch (MalformedURLException e) { Logger.getInstance(getClass().getName()).error(e); - } catch (InputFailedException e) { + } catch (InputFailedException | OutputFailedException | InvalidParamsException e) { // handled by ErrorHandler - } catch (InvalidParamsException e) { - // handled by ErrorHandler - } catch (OutputFailedException e) { - // handled by ErrorHandler - } catch (SAXException e) { + } + catch (SAXException e) { // cannot happen or is already handled } }