Map.Entry<DN, List<SubEntry>> mapEntry = setIterator.next();
List<SubEntry> subList = mapEntry.getValue();
Iterator<SubEntry> listIterator = subList.iterator();
while (listIterator.hasNext())
{
SubEntry subEntry = listIterator.next();
if (backend.handlesEntry(subEntry.getDN()))
{
dit2SubEntry.remove(subEntry.getDN());
listIterator.remove();
// Notify change listeners.
for (SubentryChangeListener changeListener :
changeListeners)
{
try
{
changeListener.handleSubentryDelete(
subEntry.getEntry());
}
catch (Exception e)
{
if (debugEnabled())
{
TRACER.debugCaught(DebugLogLevel.ERROR, e);
}
}
}
}
}
if (subList.isEmpty())
{
setIterator.remove();
}
}
setIterator = dn2CollectiveSubEntry.entrySet().iterator();
while (setIterator.hasNext())
{
Map.Entry<DN, List<SubEntry>> mapEntry = setIterator.next();
List<SubEntry> subList = mapEntry.getValue();
Iterator<SubEntry> listIterator = subList.iterator();
while (listIterator.hasNext())
{
SubEntry subEntry = listIterator.next();
if (backend.handlesEntry(subEntry.getDN()))
{
dit2SubEntry.remove(subEntry.getDN());
listIterator.remove();
// Notify change listeners.
for (SubentryChangeListener changeListener :
changeListeners)
{
try
{
changeListener.handleSubentryDelete(
subEntry.getEntry());
}
catch (Exception e)
{
if (debugEnabled())
{