| | |
| | | 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 " |
| | |
| | | } |
| | | 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; |
| | | } |
| | | } |