int interceptorsRemoved = 0;
if (insertedInterceptors != null)
{
for (int i = 0; i < insertedInterceptors.size(); i++)
{
Interceptor interceptor = insertedInterceptors.get(i);
if (interceptor.getName().equals(name))
{
ArrayList<Interceptor> newList = new ArrayList<Interceptor>();
newList.addAll(insertedInterceptors);
newList.remove(i);
insertedInterceptors = newList;
interceptorsRemoved ++;
}
}
}
if (appendedInterceptors != null)
{
for (int i = 0; i < appendedInterceptors.size(); i++)
{
Interceptor interceptor = appendedInterceptors.get(i);
if (interceptor.getName().equals(name))
{
ArrayList<Interceptor> newList = new ArrayList<Interceptor>();
newList.addAll(appendedInterceptors);
newList.remove(i);
appendedInterceptors = newList;