@Test public void destroyUninitializedDelegateTest() { LazyDelegateFilter<Filter> delegateFilter = new LazyDelegateFilter<Filter>(filterMock.getClass()); delegateFilter.destroy(); verify(filterMock, never()).destroy(); }
@Override public void destroy() { if (delegate != null) { delegate.destroy(); } }
LazyDelegateFilter implements Filter { @Override public void destroy() { if (delegate != null) { delegate.destroy(); } } }
LazyDelegateFilter implements Filter { @Override public void destroy() { if (delegate != null) { delegate.destroy(); } } LazyDelegateFilter(Class<? extends T> delegateClass); }
LazyDelegateFilter implements Filter { @Override public void destroy() { if (delegate != null) { delegate.destroy(); } } LazyDelegateFilter(Class<? extends T> delegateClass); void lazyInit(); @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy(); InitHook<T> getInitHook(); void setInitHook(InitHook<T> initHook); Class<? extends T> getDelegateClass(); }
LazyDelegateFilter implements Filter { @Override public void destroy() { if (delegate != null) { delegate.destroy(); } } LazyDelegateFilter(Class<? extends T> delegateClass); void lazyInit(); @Override void init(FilterConfig filterConfig); @Override void doFilter(ServletRequest request, ServletResponse response, FilterChain chain); @Override void destroy(); InitHook<T> getInitHook(); void setInitHook(InitHook<T> initHook); Class<? extends T> getDelegateClass();  }