@Test public void testDetachAppender() throws Exception { NOPAppender<TestEvent> ta = new NOPAppender<TestEvent>(); ta.start(); aai.addAppender(ta); NOPAppender<TestEvent> tab = new NOPAppender<TestEvent>(); tab.setName("test"); tab.start(); aai.addAppender(tab); assertTrue("Appender not detached", aai.detachAppender(tab)); assertNull("Appender was not removed", aai.getAppender("test")); assertFalse("Appender detach error", aai.detachAppender(tab)); }
public boolean detachAppender(Appender<E> appender) { if (appender == null) { return false; } boolean result; result = appenderList.remove(appender); return result; }
AppenderAttachableImpl implements AppenderAttachable<E> { public boolean detachAppender(Appender<E> appender) { if (appender == null) { return false; } boolean result; result = appenderList.remove(appender); return result; } }
AppenderAttachableImpl implements AppenderAttachable<E> { public boolean detachAppender(Appender<E> appender) { if (appender == null) { return false; } boolean result; result = appenderList.remove(appender); return result; }  }
AppenderAttachableImpl implements AppenderAttachable<E> { public boolean detachAppender(Appender<E> appender) { if (appender == null) { return false; } boolean result; result = appenderList.remove(appender); return result; }  void addAppender(Appender<E> newAppender); int appendLoopOnAppenders(E e); Iterator<Appender<E>> iteratorForAppenders(); Appender<E> getAppender(String name); boolean isAttached(Appender<E> appender); void detachAndStopAllAppenders(); boolean detachAppender(Appender<E> appender); boolean detachAppender(String name); }
AppenderAttachableImpl implements AppenderAttachable<E> { public boolean detachAppender(Appender<E> appender) { if (appender == null) { return false; } boolean result; result = appenderList.remove(appender); return result; }  void addAppender(Appender<E> newAppender); int appendLoopOnAppenders(E e); Iterator<Appender<E>> iteratorForAppenders(); Appender<E> getAppender(String name); boolean isAttached(Appender<E> appender); void detachAndStopAllAppenders(); boolean detachAppender(Appender<E> appender); boolean detachAppender(String name);  }