diff --git a/src/main/java/com/avaje/ebean/dbmigration/migrationreader/MigrationXmlWriter.java b/src/main/java/com/avaje/ebean/dbmigration/migrationreader/MigrationXmlWriter.java index 9c19f0382..5fb293a37 100644 --- a/src/main/java/com/avaje/ebean/dbmigration/migrationreader/MigrationXmlWriter.java +++ b/src/main/java/com/avaje/ebean/dbmigration/migrationreader/MigrationXmlWriter.java @@ -45,10 +45,7 @@ public class MigrationXmlWriter { writer.close(); - } catch (IOException e) { - throw new RuntimeException(e); - - } catch (JAXBException e) { + } catch (IOException | JAXBException e) { throw new RuntimeException(e); } } diff --git a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanLifecycleAdapterFactory.java b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanLifecycleAdapterFactory.java index 19e782aab..029f83fb6 100644 --- a/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanLifecycleAdapterFactory.java +++ b/src/main/java/com/avaje/ebeaninternal/server/deploy/BeanLifecycleAdapterFactory.java @@ -170,9 +170,7 @@ public class BeanLifecycleAdapterFactory { private void invoke(Method method, Object bean) { try { method.invoke(bean); - } catch (InvocationTargetException e) { - throw new PersistenceException("Error invoking lifecycle method", e); - } catch (IllegalAccessException e) { + } catch (InvocationTargetException | IllegalAccessException e) { throw new PersistenceException("Error invoking lifecycle method", e); } } @@ -237,9 +235,7 @@ public class BeanLifecycleAdapterFactory { private void invoke(Method method, Object bean) { try { method.invoke(bean); - } catch (InvocationTargetException e) { - throw new PersistenceException("Error invoking lifecycle method", e); - } catch (IllegalAccessException e) { + } catch (InvocationTargetException | IllegalAccessException e) { throw new PersistenceException("Error invoking lifecycle method", e); } } @@ -272,9 +268,7 @@ public class BeanLifecycleAdapterFactory { private void invoke(Method method, Object bean) { try { method.invoke(bean); - } catch (InvocationTargetException e) { - throw new PersistenceException("Error invoking lifecycle method", e); - } catch (IllegalAccessException e) { + } catch (InvocationTargetException | IllegalAccessException e) { throw new PersistenceException("Error invoking lifecycle method", e); } } diff --git a/src/test/java/com/avaje/tests/idkeys/TestPropertyChangeSupport.java b/src/test/java/com/avaje/tests/idkeys/TestPropertyChangeSupport.java index 9b5b7911e..b604d74d5 100644 --- a/src/test/java/com/avaje/tests/idkeys/TestPropertyChangeSupport.java +++ b/src/test/java/com/avaje/tests/idkeys/TestPropertyChangeSupport.java @@ -163,11 +163,7 @@ public class TestPropertyChangeSupport extends EbeanTestCase implements Property Method apcs = al.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class); apcs.invoke(al, listener); - } catch (NoSuchMethodException e) { - throw new RuntimeException(e); - } catch (IllegalAccessException e) { - throw new RuntimeException(e); - } catch (InvocationTargetException e) { + } catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) { throw new RuntimeException(e); } }