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

Jean-Noel Rouvignac
20.20.2015 35d21f17d7979f7dfe80928b9f3550cf76548fd1
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/ImportLDIFReader.java
@@ -163,7 +163,7 @@
          logToSkipWriter(lines, ERR_LDIF_SKIP.get(entryDN));
          continue;
        }
        suffix = Importer.getMatchSuffix(entryDN, suffixesMap);
        suffix = getMatchSuffix(entryDN, suffixesMap);
        if (suffix == null)
        {
          logger.trace("Skipping entry %s because the DN is not one that "
@@ -293,4 +293,28 @@
    }
    return true;
  }
  /**
   * Return the suffix instance in the specified map that matches the specified DN.
   *
   * @param dn
   *          The DN to search for.
   * @param map
   *          The map to search.
   * @return The suffix instance that matches the DN, or null if no match is found.
   */
  private Suffix getMatchSuffix(DN dn, Map<DN, Suffix> map)
  {
    DN nodeDN = dn;
    while (nodeDN != null)
    {
      final Suffix suffix = map.get(nodeDN);
      if (suffix != null)
      {
        return suffix;
      }
      nodeDN = nodeDN.getParentDNInSuffix();
    }
    return null;
  }
}
opendj-sdk/opendj-server-legacy/src/main/java/org/opends/server/backends/pluggable/Importer.java
@@ -412,33 +412,6 @@
  }
  /**
   * Return the suffix instance in the specified map that matches the specified
   * DN.
   *
   * @param dn
   *          The DN to search for.
   * @param map
   *          The map to search.
   * @return The suffix instance that matches the DN, or null if no match is
   *         found.
   */
  public static Suffix getMatchSuffix(DN dn, Map<DN, Suffix> map)
  {
    Suffix suffix = null;
    DN nodeDN = dn;
    while (suffix == null && nodeDN != null)
    {
      suffix = map.get(nodeDN);
      if (suffix == null)
      {
        nodeDN = nodeDN.getParentDNInSuffix();
      }
    }
    return suffix;
  }
  /**
   * Calculate buffer sizes and initialize properties based on memory.
   *
   * @throws InitializationException