@Test public void wrapsRuntimeExceptionThrownByInitMethodWithInternalException() { thrown.expect(lifecycleMethodInvocationExceptionMatcher("init fails")); lifecycleMethodStrategy.invokeInitializeMethods(new LifeCycleMethodsThrowsRuntimeException()); }
@Override public void invokeInitializeMethods(Object o) { final Class<?> aClass = o.getClass(); Method[] initMethods = null; try { initMethods = initializeMethodsCache.get(aClass); } catch (ExecutionException e) { Throwables.propagate(e); } if (initMethods != null && initMethods.length > 0) { doInvokeLifecycleMethods(o, initMethods); } }
AnnotatedLifecycleMethodStrategy implements LifecycleMethodStrategy { @Override public void invokeInitializeMethods(Object o) { final Class<?> aClass = o.getClass(); Method[] initMethods = null; try { initMethods = initializeMethodsCache.get(aClass); } catch (ExecutionException e) { Throwables.propagate(e); } if (initMethods != null && initMethods.length > 0) { doInvokeLifecycleMethods(o, initMethods); } } }
AnnotatedLifecycleMethodStrategy implements LifecycleMethodStrategy { @Override public void invokeInitializeMethods(Object o) { final Class<?> aClass = o.getClass(); Method[] initMethods = null; try { initMethods = initializeMethodsCache.get(aClass); } catch (ExecutionException e) { Throwables.propagate(e); } if (initMethods != null && initMethods.length > 0) { doInvokeLifecycleMethods(o, initMethods); } } AnnotatedLifecycleMethodStrategy(); }
AnnotatedLifecycleMethodStrategy implements LifecycleMethodStrategy { @Override public void invokeInitializeMethods(Object o) { final Class<?> aClass = o.getClass(); Method[] initMethods = null; try { initMethods = initializeMethodsCache.get(aClass); } catch (ExecutionException e) { Throwables.propagate(e); } if (initMethods != null && initMethods.length > 0) { doInvokeLifecycleMethods(o, initMethods); } } AnnotatedLifecycleMethodStrategy(); @Override void invokeInitializeMethods(Object o); @Override void invokeDestroyMethods(Object o); }
AnnotatedLifecycleMethodStrategy implements LifecycleMethodStrategy { @Override public void invokeInitializeMethods(Object o) { final Class<?> aClass = o.getClass(); Method[] initMethods = null; try { initMethods = initializeMethodsCache.get(aClass); } catch (ExecutionException e) { Throwables.propagate(e); } if (initMethods != null && initMethods.length > 0) { doInvokeLifecycleMethods(o, initMethods); } } AnnotatedLifecycleMethodStrategy(); @Override void invokeInitializeMethods(Object o); @Override void invokeDestroyMethods(Object o);  }