diff options
author | Carsten Hammer | 2019-05-14 16:35:17 +0000 |
---|---|---|
committer | Carsten Hammer | 2019-05-16 15:04:31 +0000 |
commit | 7d3d176e363878f43cd2189e690cc52b40360ce6 (patch) | |
tree | 50b717add6eab9ff909ba7cba9ef6883634a97e1 | |
parent | 10ee9de3dde07ba516bf2ad72c93779f0fb08100 (diff) | |
download | rt.equinox.bundles-7d3d176e363878f43cd2189e690cc52b40360ce6.tar.gz rt.equinox.bundles-7d3d176e363878f43cd2189e690cc52b40360ce6.tar.xz rt.equinox.bundles-7d3d176e363878f43cd2189e690cc52b40360ce6.zip |
Join catch sections using multicatchS4_12_0_M3I20190524-0135I20190522-1800I20190522-0600I20190521-1800I20190521-0600I20190520-1805I20190520-0600I20190519-1800I20190518-1800I20190517-1800
Change-Id: Ib3ca6d20965a8b80b6cbd76b01fa2dcf8e7c840d
Signed-off-by: Carsten Hammer <carsten.hammer@t-online.de>
31 files changed, 41 insertions, 143 deletions
diff --git a/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java b/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java index cba59d680..219ec9e84 100644 --- a/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java +++ b/bundles/org.eclipse.equinox.app/osgi/org/osgi/service/application/ApplicationDescriptor.java @@ -309,12 +309,8 @@ public abstract class ApplicationDescriptor { checkArgs(arguments, false); try { return launchSpecific(arguments); - } catch (IllegalStateException ise) { + } catch (IllegalStateException | SecurityException | ApplicationException ise) { throw ise; - } catch (SecurityException se) { - throw se; - } catch (ApplicationException ae) { - throw ae; } catch (Exception t) { throw new ApplicationException(ApplicationException.APPLICATION_INTERNAL_ERROR, t); } diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java index 0181b4a2a..ec87eb42f 100644 --- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java +++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/AppPersistence.java @@ -273,9 +273,7 @@ public class AppPersistence implements ServiceTrackerCustomizer { } } catch (InvalidSyntaxException e) { throw new IOException(e.getMessage()); - } catch (NoClassDefFoundError e) { - throw new IOException(e.getMessage()); - } catch (ClassNotFoundException e) { + } catch (NoClassDefFoundError | ClassNotFoundException e) { throw new IOException(e.getMessage()); } } diff --git a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java index acf964056..7d800ce6b 100644 --- a/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java +++ b/bundles/org.eclipse.equinox.app/src/org/eclipse/equinox/internal/app/EclipseAppHandle.java @@ -386,9 +386,7 @@ public class EclipseAppHandle extends ApplicationHandle implements ApplicationRu public synchronized Object waitForResult(int timeout) { try { return getExitValue(timeout); - } catch (ApplicationException e) { - // return null - } catch (InterruptedException e) { + } catch (ApplicationException | InterruptedException e) { // return null } return null; diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java index 224e1bdd3..d7822b7e1 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/LocalizationUtils.java @@ -42,17 +42,7 @@ public class LocalizationUtils { Object value = field.get(null); if (value instanceof String) return (String) value; - } catch (ClassNotFoundException e) { - // eat exception and fall through - } catch (NoClassDefFoundError e) { - // eat exception and fall through - } catch (SecurityException e) { - // eat exception and fall through - } catch (NoSuchFieldException e) { - // eat exception and fall through - } catch (IllegalArgumentException e) { - // eat exception and fall through - } catch (IllegalAccessException e) { + } catch (ClassNotFoundException | NoClassDefFoundError | SecurityException | NoSuchFieldException | IllegalArgumentException | IllegalAccessException e) { // eat exception and fall through } return key; diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java index ad28e97d2..321eb4d58 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/internal/runtime/RuntimeLog.java @@ -104,9 +104,7 @@ public final class RuntimeLog { for (int i = 0; i < listeners.length; i++) { try { listeners[i].logging(status, IRuntimeConstants.PI_RUNTIME); - } catch (Exception e) { - handleException(e); - } catch (LinkageError e) { + } catch (Exception | LinkageError e) { handleException(e); } } @@ -162,9 +160,7 @@ public final class RuntimeLog { for (int i = 0; i < listeners.length; i++) { try { listeners[i].logging(status, IRuntimeConstants.PI_RUNTIME); - } catch (Exception e) { - handleException(e); - } catch (LinkageError e) { + } catch (Exception | LinkageError e) { handleException(e); } } diff --git a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java index 534777b8f..3d6861f8b 100644 --- a/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java +++ b/bundles/org.eclipse.equinox.common/src/org/eclipse/core/runtime/SafeRunner.java @@ -43,11 +43,7 @@ public final class SafeRunner { Assert.isNotNull(code); try { code.run(); - } catch (Exception e) { - handleException(code, e); - } catch (LinkageError e) { - handleException(code, e); - } catch (AssertionError e) { + } catch (Exception | LinkageError | AssertionError e) { handleException(code, e); } } diff --git a/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF index 6346a1d87..2621590b8 100644 --- a/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.console.ssh/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-SymbolicName: org.eclipse.equinox.console.ssh -Bundle-Version: 1.2.100.qualifier +Bundle-Version: 1.2.200.qualifier Bundle-Activator: org.eclipse.equinox.console.ssh.Activator Bundle-Vendor: %bundleVendor Bundle-Localization: plugin diff --git a/bundles/org.eclipse.equinox.console.ssh/pom.xml b/bundles/org.eclipse.equinox.console.ssh/pom.xml index 0794ec632..ba02e34b9 100644 --- a/bundles/org.eclipse.equinox.console.ssh/pom.xml +++ b/bundles/org.eclipse.equinox.console.ssh/pom.xml @@ -19,6 +19,6 @@ </parent> <groupId>org.eclipse.equinox</groupId> <artifactId>org.eclipse.equinox.console.ssh</artifactId> - <version>1.2.100-SNAPSHOT</version> + <version>1.2.200-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java b/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java index 6128b26f9..dd69e3083 100755 --- a/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java +++ b/bundles/org.eclipse.equinox.console.ssh/src/org/eclipse/equinox/console/jaas/SecureStorageLoginModule.java @@ -55,9 +55,7 @@ public class SecureStorageLoginModule implements LoginModule { PasswordCallback passwordCallback = new PasswordCallback("password: ", false); try { callbackHandler.handle(new Callback[]{nameCallback, passwordCallback}); - } catch (IOException e) { - throw new FailedLoginException("Cannot get username and password"); - } catch (UnsupportedCallbackException e) { + } catch (IOException | UnsupportedCallbackException e) { throw new FailedLoginException("Cannot get username and password"); } diff --git a/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF index c2bd893ec..19662e266 100755 --- a/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.console/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %bundleName Bundle-SymbolicName: org.eclipse.equinox.console -Bundle-Version: 1.3.200.qualifier +Bundle-Version: 1.3.300.qualifier Bundle-Activator: org.eclipse.equinox.console.command.adapter.Activator Bundle-Vendor: %bundleVendor Bundle-Localization: plugin diff --git a/bundles/org.eclipse.equinox.console/pom.xml b/bundles/org.eclipse.equinox.console/pom.xml index 9ba5b1c74..b0862a26c 100644 --- a/bundles/org.eclipse.equinox.console/pom.xml +++ b/bundles/org.eclipse.equinox.console/pom.xml @@ -19,6 +19,6 @@ </parent> <groupId>org.eclipse.equinox</groupId> <artifactId>org.eclipse.equinox.console</artifactId> - <version>1.3.200-SNAPSHOT</version> + <version>1.3.300-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java index be09f535a..0df4a59e5 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/command/adapter/CustomCommandInterpreter.java @@ -121,8 +121,7 @@ public void printStackTrace(Throwable t) { out.println("Nested Exception"); printStackTrace(nested); } - } catch (IllegalAccessException e) { - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | InvocationTargetException e) { } } } diff --git a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java index fc1ec0c7d..f23143e89 100755 --- a/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java +++ b/bundles/org.eclipse.equinox.console/src/org/eclipse/equinox/console/commands/EquinoxCommandProvider.java @@ -423,10 +423,7 @@ public class EquinoxCommandProvider implements SynchronousBundleListener { if (stateFilter == -1) stateFilter = 0; stateFilter |= match.getInt(match); - } catch (NoSuchFieldException e) { - System.out.println(ConsoleMsg.CONSOLE_INVALID_INPUT + ": " + desiredState); //$NON-NLS-1$ - throw new IllegalArgumentException(); - } catch (IllegalAccessException e) { + } catch (NoSuchFieldException | IllegalAccessException e) { System.out.println(ConsoleMsg.CONSOLE_INVALID_INPUT + ": " + desiredState); //$NON-NLS-1$ throw new IllegalArgumentException(); } diff --git a/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF index 5f07f17b8..e41da993a 100644 --- a/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.http.jetty/META-INF/MANIFEST.MF @@ -4,7 +4,7 @@ Bundle-Name: %bundleName Bundle-Vendor: %providerName Bundle-Localization: plugin Bundle-SymbolicName: org.eclipse.equinox.http.jetty -Bundle-Version: 3.7.0.qualifier +Bundle-Version: 3.7.100.qualifier Bundle-Activator: org.eclipse.equinox.http.jetty.internal.Activator Import-Package: javax.servlet;version="[3.1.0,5.0.0)", javax.servlet.http;version="[3.1.0,5.0.0)", diff --git a/bundles/org.eclipse.equinox.http.jetty/pom.xml b/bundles/org.eclipse.equinox.http.jetty/pom.xml index 6e9ce8eab..f7f8b4095 100644 --- a/bundles/org.eclipse.equinox.http.jetty/pom.xml +++ b/bundles/org.eclipse.equinox.http.jetty/pom.xml @@ -21,6 +21,6 @@ </parent> <groupId>org.eclipse.equinox</groupId> <artifactId>org.eclipse.equinox.http.jetty</artifactId> - <version>3.7.0-SNAPSHOT</version> + <version>3.7.100-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java index ea16184f4..42123b2ea 100644 --- a/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java +++ b/bundles/org.eclipse.equinox.http.jetty/src/org/eclipse/equinox/http/jetty/internal/HttpServerManager.java @@ -337,9 +337,7 @@ public class HttpServerManager implements ManagedServiceFactory { thread.setContextClassLoader(contextLoader); try { sessionDestroyed.invoke(httpServiceServlet, event.getSession().getId()); - } catch (IllegalAccessException e) { - // not likely - } catch (IllegalArgumentException e) { + } catch (IllegalAccessException | IllegalArgumentException e) { // not likely } catch (InvocationTargetException e) { throw new RuntimeException(e.getCause()); @@ -355,9 +353,7 @@ public class HttpServerManager implements ManagedServiceFactory { thread.setContextClassLoader(contextLoader); try { sessionIdChanged.invoke(httpServiceServlet, oldSessionId); - } catch (IllegalAccessException e) { - // not likely - } catch (IllegalArgumentException e) { + } catch (IllegalAccessException | IllegalArgumentException e) { // not likely } catch (InvocationTargetException e) { throw new RuntimeException(e.getCause()); diff --git a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java index caffecf6b..6c2c88dbb 100644 --- a/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java +++ b/bundles/org.eclipse.equinox.http.servlet/src/org/eclipse/equinox/http/servlet/internal/servlet/ResponseStateHandler.java @@ -156,10 +156,7 @@ public class ResponseStateHandler { try (ServletOutputStream outputStream = response.getOutputStream()) { // just force a close } - catch (IllegalStateException ise2) { - // ignore - } - catch (IOException ioe) { + catch (IllegalStateException | IOException ise2) { // ignore } } diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java index b298a9b78..b2b0daa4e 100644 --- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java +++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/internal/preferences/DefaultPreferences.java @@ -366,17 +366,13 @@ public class DefaultPreferences extends EclipsePreferences { try { input = url.openStream(); result.load(input); - } catch (IOException e) { - if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) { - PrefsMessages.message("Problem opening stream to preference customization file: " + url); //$NON-NLS-1$ - e.printStackTrace(); - } - } catch (IllegalArgumentException e) { + } catch (IOException | IllegalArgumentException e) { if (EclipsePreferences.DEBUG_PREFERENCE_GENERAL) { PrefsMessages.message("Problem opening stream to preference customization file: " + url); //$NON-NLS-1$ e.printStackTrace(); } - } finally { + } + finally { if (input != null) try { input.close(); diff --git a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java index 1140a4546..13a0d3737 100644 --- a/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java +++ b/bundles/org.eclipse.equinox.preferences/src/org/eclipse/core/runtime/preferences/AbstractPreferenceStorage.java @@ -76,9 +76,7 @@ public abstract class AbstractPreferenceStorage { try { input = new BufferedInputStream(input); result.load(input); - } catch (IOException e) { - throw new BackingStoreException(PrefsMessages.preferences_loadProblems, e); - } catch (IllegalArgumentException e) { + } catch (IOException | IllegalArgumentException e) { throw new BackingStoreException(PrefsMessages.preferences_loadProblems, e); } finally { if (input != null) diff --git a/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF b/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF index 676f9dbe2..72b7a42b1 100644 --- a/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF +++ b/bundles/org.eclipse.equinox.registry/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.equinox.registry;singleton:=true -Bundle-Version: 3.8.300.qualifier +Bundle-Version: 3.8.400.qualifier Bundle-Localization: plugin Export-Package: org.eclipse.core.internal.adapter;x-internal:=true, org.eclipse.core.internal.registry;x-friends:="org.eclipse.core.runtime", diff --git a/bundles/org.eclipse.equinox.registry/pom.xml b/bundles/org.eclipse.equinox.registry/pom.xml index b411c9736..3b5e2ea53 100644 --- a/bundles/org.eclipse.equinox.registry/pom.xml +++ b/bundles/org.eclipse.equinox.registry/pom.xml @@ -19,6 +19,6 @@ </parent> <groupId>org.eclipse.equinox</groupId> <artifactId>org.eclipse.equinox.registry</artifactId> - <version>3.8.300-SNAPSHOT</version> + <version>3.8.400-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> </project> diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java index fa58c9658..445ad805a 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/ExtensionRegistry.java @@ -1099,13 +1099,7 @@ public class ExtensionRegistry implements IExtensionRegistry, IDynamicExtensionR if (status == IStatus.ERROR || status == IStatus.CANCEL) return false; } - } catch (ParserConfigurationException e) { - logError(ownerName, contributionName, e); - return false; - } catch (SAXException e) { - logError(ownerName, contributionName, e); - return false; - } catch (IOException e) { + } catch (ParserConfigurationException | SAXException | IOException e) { logError(ownerName, contributionName, e); return false; } finally { diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java index d4041185a..6238a7ae1 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/EquinoxRegistryStrategy.java @@ -93,10 +93,10 @@ public class EquinoxRegistryStrategy extends RegistryStrategyOSGI { try { new ExtensionEventDispatcherJob(listeners, deltas, registry).schedule(); return; // all done - most typical use case - } catch (NoClassDefFoundError e) { - useJobs = false; // Jobs are missing - } catch (IllegalStateException e) { - useJobs = false; // Jobs bundles was stopped + } catch (NoClassDefFoundError | IllegalStateException e) { + useJobs = false; + // Jobs are missing or + // Jobs bundles was stopped } } super.scheduleChangeEvent(listeners, deltas, registry); diff --git a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java index 40715fbc2..f847124cd 100644 --- a/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java +++ b/bundles/org.eclipse.equinox.registry/src/org/eclipse/core/internal/registry/osgi/RegistryStrategyOSGI.java @@ -194,20 +194,16 @@ public class RegistryStrategyOSGI extends RegistryStrategy { Class<?> classInstance = null; try { classInstance = contributingBundle.loadClass(className); - } catch (Exception e1) { + } catch (Exception | LinkageError e1) { throwException(NLS.bind(RegistryMessages.plugin_loadClassError, contributingBundle.getSymbolicName(), className), e1); - } catch (LinkageError e) { - throwException(NLS.bind(RegistryMessages.plugin_loadClassError, contributingBundle.getSymbolicName(), className), e); } // create a new instance Object result = null; try { result = classInstance.getDeclaredConstructor().newInstance(); - } catch (Exception e) { + } catch (Exception | LinkageError e) { throwException(NLS.bind(RegistryMessages.plugin_instantiateClassError, contributingBundle.getSymbolicName(), className), e); - } catch (LinkageError e1) { - throwException(NLS.bind(RegistryMessages.plugin_instantiateClassError, contributingBundle.getSymbolicName(), className), e1); } return result; } diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java index 39c88138e..052d59326 100644 --- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java +++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/JavaEncryption.java @@ -149,25 +149,10 @@ public class JavaEncryption { byte[] result = c.doFinal(clearText); return new CryptoData(passwordExt.getModuleID(), salt, result, iv); - } catch (InvalidKeyException e) { + } catch (InvalidKeyException | InvalidAlgorithmParameterException | IllegalBlockSizeException | BadPaddingException e) { handle(e, StorageException.ENCRYPTION_ERROR); return null; - } catch (InvalidAlgorithmParameterException e) { - handle(e, StorageException.ENCRYPTION_ERROR); - return null; - } catch (IllegalBlockSizeException e) { - handle(e, StorageException.ENCRYPTION_ERROR); - return null; - } catch (BadPaddingException e) { - handle(e, StorageException.ENCRYPTION_ERROR); - return null; - } catch (InvalidKeySpecException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchPaddingException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchAlgorithmException e) { + } catch (InvalidKeySpecException | NoSuchPaddingException | NoSuchAlgorithmException e) { handle(e, StorageException.INTERNAL_ERROR); return null; } @@ -200,19 +185,7 @@ public class JavaEncryption { byte[] result = c.doFinal(encryptedData.getData()); return result; - } catch (InvalidAlgorithmParameterException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (InvalidKeyException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (InvalidKeySpecException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchPaddingException e) { - handle(e, StorageException.INTERNAL_ERROR); - return null; - } catch (NoSuchAlgorithmException e) { + } catch (InvalidAlgorithmParameterException | InvalidKeyException | InvalidKeySpecException | NoSuchPaddingException | NoSuchAlgorithmException e) { handle(e, StorageException.INTERNAL_ERROR); return null; } diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java index ee3070d71..bfed37322 100644 --- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java +++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/PasswordManagement.java @@ -131,13 +131,7 @@ public class PasswordManagement { CryptoData encryptedData = new CryptoData(node.internalGet(PASSWORD_RECOVERY_KEY)); byte[] data = root.getCipher().decrypt(internalPasswordExt, encryptedData); return StorageUtils.getString(data); - } catch (IllegalStateException e) { - return null; - } catch (IllegalBlockSizeException e) { - return null; - } catch (BadPaddingException e) { - return null; - } catch (StorageException e) { + } catch (IllegalStateException | IllegalBlockSizeException | BadPaddingException | StorageException e) { return null; } } diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java index d9b7f273c..e7761eb06 100644 --- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java +++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferences.java @@ -271,9 +271,7 @@ public class SecurePreferences { try { byte[] clearText = getRoot().getCipher().decrypt(passwordExt, data); return StorageUtils.getString(clearText); - } catch (IllegalBlockSizeException e) { // invalid password? - throw new StorageException(StorageException.DECRYPTION_ERROR, e); - } catch (BadPaddingException e) { // invalid password? + } catch (IllegalBlockSizeException | BadPaddingException e) { // invalid password? throw new StorageException(StorageException.DECRYPTION_ERROR, e); } } diff --git a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java index 0ed54efdf..3477e6dc4 100644 --- a/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java +++ b/bundles/org.eclipse.equinox.security/src/org/eclipse/equinox/internal/security/storage/SecurePreferencesRoot.java @@ -286,10 +286,7 @@ public class SecurePreferencesRoot extends SecurePreferences implements IStorage validPassword = true; break; } - } catch (IllegalBlockSizeException e) { - if (!moduleExt.changePassword(e, container)) - break; - } catch (BadPaddingException e) { + } catch (IllegalBlockSizeException | BadPaddingException e) { if (!moduleExt.changePassword(e, container)) break; } diff --git a/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java b/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java index af7409f42..dfd5b0547 100644 --- a/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java +++ b/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/ProxyStreamTransformer.java @@ -48,9 +48,7 @@ public class ProxyStreamTransformer extends StreamTransformer { public InputStream getInputStream(InputStream inputStream, URL transformerUrl) throws IOException { try { return (InputStream) method.invoke(object, new Object[] {inputStream, transformerUrl}); - } catch (IllegalArgumentException e) { - throw new IOException(e.getMessage()); - } catch (IllegalAccessException e) { + } catch (IllegalArgumentException | IllegalAccessException e) { throw new IOException(e.getMessage()); } catch (InvocationTargetException e) { if (e.getCause() instanceof IOException) diff --git a/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java b/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java index 91dd60089..b86e6502f 100644 --- a/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java +++ b/bundles/org.eclipse.equinox.transforms.hook/src/org/eclipse/equinox/internal/transforms/TransformerList.java @@ -93,9 +93,7 @@ public class TransformerList extends ServiceTracker<Object, Object> { try { transformer = new ProxyStreamTransformer(object); transformers.put(type, transformer); - } catch (SecurityException e) { - logServices.log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Problem creating transformer", e); //$NON-NLS-1$ - } catch (NoSuchMethodException e) { + } catch (SecurityException | NoSuchMethodException e) { logServices.log(EquinoxContainer.NAME, FrameworkLogEntry.ERROR, "Problem creating transformer", e); //$NON-NLS-1$ } } diff --git a/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java b/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java index a648e0ed2..efaf6fcf7 100644 --- a/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java +++ b/bundles/org.eclipse.equinox.weaving.caching/src/org/eclipse/equinox/weaving/internal/caching/Activator.java @@ -117,12 +117,7 @@ public class Activator implements BundleActivator { enabled = false; } } - } catch (final ClassNotFoundException ex) { - } catch (final SecurityException e) { - } catch (final NoSuchMethodException e) { - } catch (final IllegalArgumentException e) { - } catch (final IllegalAccessException e) { - } catch (final InvocationTargetException e) { + } catch (final ClassNotFoundException | SecurityException | NoSuchMethodException | IllegalArgumentException | IllegalAccessException | InvocationTargetException ex) { } return enabled; |