mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
25.23.2006 f2103f466892df823201ed457d0c73a8dd3ddfc0
Update the LDIF diff tool to fix a potential infinite loop that could occur if
the last entry in the source file had been deleted.

OpenDS Issue Number: 881
1 files modified
13 ■■■■■ changed files
opends/src/server/org/opends/server/tools/LDIFDiff.java 13 ●●●●● patch | view | raw | blame | history
opends/src/server/org/opends/server/tools/LDIFDiff.java
@@ -510,16 +510,13 @@
            {
              // There are no more target entries so all of the remaining source
              // entries are deletes.
              while (true)
              writeDelete(writer, sourceEntry);
              differenceFound = true;
              while (sourceIterator.hasNext())
              {
                sourceDN = sourceIterator.next();
                sourceEntry = sourceMap.get(sourceDN);
                writeDelete(writer, sourceEntry);
                differenceFound = true;
                while (sourceIterator.hasNext())
                {
                  sourceDN = sourceIterator.next();
                  sourceEntry = sourceMap.get(sourceDN);
                  writeDelete(writer, sourceEntry);
                }
              }
            }
          }