/*
(non-Javadoc)

@see
org.apache.log4j.helpers.AppenderAttachableImpl#removeAppender(org.apache
.log4j.Appender)
501331
@Override
    public void removeAppender(Appender appender) {
        if (appender == null || appenderList == null)
            return;
        appenderList.remove(appender);
        configuredAppenderList.remove(appender.getName());
    }
1012674
public
    void removeAppender(String name) {
        if(name == null) return;
        for (Iterator<Appender> it = appenderList.iterator(); it.hasNext();) {
            if (name.equals(it.next().getName())) {
                it.remove();
                break;
            }
        }
    }
1235997
public void removeListener(ChangeListener listener) {
        synchronized (hsChangeListeners) {
            hsChangeListeners.remove(listener);
            changeListenerCount = hsChangeListeners.size();
            bUpdateChangeListener = true;
        }
    }
697625
@Override
    public boolean isAttached(Appender appender) {
        if (appenderList == null || appender == null)
            return false;
        Appender a;
        Iterator<Appender> it = appenderList.iterator();
        while (it.hasNext()) {
            a = (Appender) it.next();
            if (a == appender) {
                return true;
            }
        }
        return false;
    }
1003598
public synchronized void unregister(@NonNull EventHandlerWrapper eventHandler) {
        String type = eventHandler.type;
        List<EventHandlerWrapper> handlers = subscribers.get(type);
        if (handlers != null) {
            handlers.remove(eventHandler);
        }
    }
789109
public void removeResourceChangeListener(ResourceChangeListener pListener, Object pResourceId) {
        synchronized (timerEntries) {
            removeListenerInternal(getResourceId(pResourceId, pListener));
        }
    }
1272280
public <C extends PreClassLoaderInitiator> void removePreInitiator(Class<C> clazz) {
    this.preInitiators.remove(clazz.getName());
  }
727226
private synchronized boolean removeWrapperFromList(EventListenerWrapper<K, V> wrapper, List<EventListenerWrapper<K, V>> listenersList) {
    int index = listenersList.indexOf(wrapper);
    if (index != -1) {
      EventListenerWrapper<K, V> containedWrapper = listenersList.remove(index);
      if(containedWrapper.isOrdered() && --orderedListenerCount == 0) {
        storeEventSource.setEventOrdering(false);
      }
      if (--listenersCount == 0) {
        storeEventSource.removeEventListener(eventListener);
      }
      return true;
    }
    return false;
  }
964041
public void removeServiceInstanceChangeListener(String serviceName, ServiceInstanceChangeListener listener) {
        ServiceInstanceUtils.validateServiceName(serviceName);
        if (listener == null) {
            throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR,
                    ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR.getMessageTemplate(),
                    "ServiceInstanceChangeListener");
        }
        List<InstanceChangeListener<ModelServiceInstance>> list = changeListenerMap.get(serviceName);
        if (list != null) {
            boolean found = false;
            for (InstanceChangeListener<ModelServiceInstance> l : list) {
                if (l instanceof ServiceInstanceChangeListenerAdapter
                        && ((ServiceInstanceChangeListenerAdapter) l).getAdapter() == listener) {
                    list.remove(l);
                    found = true;
                    break;
                }
            }
            if (!found) {
                LOGGER.error(ErrorCode.SERVICE_INSTANCE_LISTENER_DOES_NOT_EXIST.getMessageTemplate());
            }
            if (list.isEmpty()) {
                changeListenerMap.remove(serviceName);
            }
        } else {
            LOGGER.error(String.format(ErrorCode.SERVICE_DOES_NOT_EXIST.getMessageTemplate(), serviceName));
        }

    }
1054552
@Override
  public void remove() {
    Assert.state(nextCalled.compareAndSet(true, false), "next was not called before remove");
    int iteratorIndexForRemove = (currentIteratorIndex - 1);
    iteratorIndexForRemove = (iteratorIndexForRemove < 0 ? iteratorList.size() - 1 : iteratorIndexForRemove);
    iteratorList.get(iteratorIndexForRemove).remove();
  }
519625
public void removeAllAppenders() {
        for (Appender appender : aai.getAppenders()) {
            aai.removeAppender(appender);
            fireRemoveAppenderEvent(appender);
        }
    }
1084790
@Override
    public void removeNotificationHandler(String serviceName, NotificationHandler handler) throws ServiceException {

        ServiceInstanceUtils.validateManagerIsStarted(isStarted.get());
        ServiceInstanceUtils.validateServiceName(serviceName);
        if (handler == null) {
            throw new ServiceException(ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR,
                    ErrorCode.SERVICE_DIRECTORY_NULL_ARGUMENT_ERROR.getMessageTemplate(),
                    "NotificationHandler");
        }
        
        getLookupService().removeNotificationHandler(serviceName, handler);
    }
344290
@Override
    public void removeAppender(Appender appender) {
        if (appender == null || aai == null) {
            return;
        }
        boolean wasAttached = aai.isAttached(appender);
        aai.removeAppender(appender);
        if (wasAttached) {
            fireRemoveAppenderEvent(appender);
        }
    }
1268603
public void removeExistingBody(/* @Nullable */ JvmMember member) {
		if (member != null) {
			// We have to be careful how to remove existing adapters due to an EMF bug:
			// https://bugs.eclipse.org/bugs/show_bug.cgi?id=462451
			Object[] adapters = member.eAdapters().toArray();
			for (int i = 0, j = 0; i < adapters.length; i++) {
				if (adapters[i] instanceof CompilationStrategyAdapter
						|| adapters[i] instanceof CompilationTemplateAdapter) {
					member.eAdapters().remove(j);
				} else {
					j++;
				}
			}
			associator.removeLogicalChildAssociation(member);
		}
	}
1190784
public void doAppend(LoggingEvent event)
    {
        if(closed) {
            LogLog.error("Attempted to append to closed appender named [" + name + "].");
            return;
        }

        if(!isAsSevereAsThreshold(event.getLevel())) {
            return;
        }

        Filter f = this.headFilter;

        FILTER_LOOP:
        while(f != null) {
            switch(f.decide(event)) {
            case Filter.DENY: return;
            case Filter.ACCEPT: break FILTER_LOOP;
            case Filter.NEUTRAL: f = f.getNext();
            }
        }

        this.append(event);
    }
314051
@Override
    public void removeAllAppenders() {
        if (aai != null) {
            Vector appenders = new Vector();
            Enumeration iter = aai.getAllAppenders();
            if (iter == null) {
                return;
            }
            while (iter.hasMoreElements()) {
                appenders.add(iter.nextElement());
            }
            aai.removeAllAppenders();
            iter = appenders.elements();
            while (iter.hasMoreElements()) {
                fireRemoveAppenderEvent((Appender) iter.nextElement());
            }
        }
    }
1365099
@Override
    synchronized void remove(PageWrapper page) {
        super.remove(page);
        if (this.incompleteNewPageOffset == page.getOffset()) {
            this.incompleteNewPageOffset = PagePointer.NO_OFFSET;
        }

        this.deletedPageOffsets.add(page.getOffset());
        page.setOffset(PagePointer.NO_OFFSET);
    }