Fix a bug in the ldif-diff tool that creates the potential that an entry
contained in both the source and target LDIF files will be included in the
output as an "add" record (potentially even if it also appears earlier in the
output as a "modify" record).
OpenDS Issue Number: 1227
| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.tools; |
| | | |
| | |
| | | { |
| | | // The target entry should be before the source entry, which means |
| | | // that the target entry has been added. |
| | | writeAdd(writer,targetEntry); |
| | | writeAdd(writer, targetEntry); |
| | | differenceFound = true; |
| | | if (targetIterator.hasNext()) |
| | | { |
| | |
| | | sourceEntry = sourceMap.get(sourceDN); |
| | | writeDelete(writer, sourceEntry); |
| | | } |
| | | |
| | | break; |
| | | } |
| | | } |
| | | } |