mirror of
https://github.com/ebean-orm/ebean.git
synced 2026-11-29 07:29:56 +00:00
Merge pull request #856 from 0xbaadf00d/feature/identical-catch
Change identical 'catch' statements
This commit is contained in:
commit
a4922a5b1d
3 files changed
+5
-18
No files matched your search
@@ -45,10 +45,7 @@ public class MigrationXmlWriter {
|
|||||||
|
|
||||||
writer.close();
|
writer.close();
|
||||||
|
|
||||||
} catch (IOException e) {
|
} catch (IOException | JAXBException e) {
|
||||||
throw new RuntimeException(e);
|
|
||||||
|
|
||||||
} catch (JAXBException e) {
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-9
@@ -170,9 +170,7 @@ public class BeanLifecycleAdapterFactory {
|
|||||||
private void invoke(Method method, Object bean) {
|
private void invoke(Method method, Object bean) {
|
||||||
try {
|
try {
|
||||||
method.invoke(bean);
|
method.invoke(bean);
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException | IllegalAccessException e) {
|
||||||
throw new PersistenceException("Error invoking lifecycle method", e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new PersistenceException("Error invoking lifecycle method", e);
|
throw new PersistenceException("Error invoking lifecycle method", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -237,9 +235,7 @@ public class BeanLifecycleAdapterFactory {
|
|||||||
private void invoke(Method method, Object bean) {
|
private void invoke(Method method, Object bean) {
|
||||||
try {
|
try {
|
||||||
method.invoke(bean);
|
method.invoke(bean);
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException | IllegalAccessException e) {
|
||||||
throw new PersistenceException("Error invoking lifecycle method", e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new PersistenceException("Error invoking lifecycle method", e);
|
throw new PersistenceException("Error invoking lifecycle method", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -272,9 +268,7 @@ public class BeanLifecycleAdapterFactory {
|
|||||||
private void invoke(Method method, Object bean) {
|
private void invoke(Method method, Object bean) {
|
||||||
try {
|
try {
|
||||||
method.invoke(bean);
|
method.invoke(bean);
|
||||||
} catch (InvocationTargetException e) {
|
} catch (InvocationTargetException | IllegalAccessException e) {
|
||||||
throw new PersistenceException("Error invoking lifecycle method", e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new PersistenceException("Error invoking lifecycle method", e);
|
throw new PersistenceException("Error invoking lifecycle method", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -163,11 +163,7 @@ public class TestPropertyChangeSupport extends EbeanTestCase implements Property
|
|||||||
|
|
||||||
Method apcs = al.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class);
|
Method apcs = al.getClass().getMethod("addPropertyChangeListener", PropertyChangeListener.class);
|
||||||
apcs.invoke(al, listener);
|
apcs.invoke(al, listener);
|
||||||
} catch (NoSuchMethodException e) {
|
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException e) {
|
||||||
throw new RuntimeException(e);
|
|
||||||
} catch (IllegalAccessException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
} catch (InvocationTargetException e) {
|
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user