Object obj = it.next();
if (obj instanceof InstanceAdvisor)
{
InstanceAdvisor advisor = (InstanceAdvisor) obj;
BaseInterceptor interceptor = (BaseInterceptor) undoMap.get(advisor);
if (interceptor == null)
{
throw new IllegalStateException("PojoCacheDelegate.undoInterceptorDetach(): null interceptor");
}
advisor.appendInterceptor(interceptor);
}
else
{
BaseInterceptor interceptor = (BaseInterceptor) undoMap.get(obj);
boolean copyToCache = false;
((AbstractCollectionInterceptor) interceptor).attach(null, copyToCache);
}
}
}