| | |
| | | public static PatternDN decode(String dnString) |
| | | throws DirectoryException |
| | | { |
| | | ArrayList<PatternRDN> rdnComponents = new ArrayList<PatternRDN>(); |
| | | ArrayList<Integer> doubleWildPos = new ArrayList<Integer>(); |
| | | ArrayList<PatternRDN> rdnComponents = new ArrayList<>(); |
| | | ArrayList<Integer> doubleWildPos = new ArrayList<>(); |
| | | |
| | | // A null or empty DN is acceptable. |
| | | if (dnString == null) |
| | |
| | | // RDN component and return the DN. |
| | | if (pos >= length) |
| | | { |
| | | ArrayList<ByteString> arrayList = new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> arrayList = new ArrayList<>(1); |
| | | arrayList.add(ByteString.empty()); |
| | | rdnComponents.add(new PatternRDN(name, arrayList, dnString)); |
| | | break; |
| | |
| | | |
| | | |
| | | // Parse the value for this RDN component. |
| | | ArrayList<ByteString> parsedValue = new ArrayList<ByteString>(); |
| | | ArrayList<ByteString> parsedValue = new ArrayList<>(); |
| | | pos = parseValuePattern(dnString, pos, parsedValue); |
| | | |
| | | |
| | |
| | | // the RDN component and return the DN. |
| | | if (pos >= length) |
| | | { |
| | | ArrayList<ByteString> arrayList = new ArrayList<ByteString>(1); |
| | | ArrayList<ByteString> arrayList = new ArrayList<>(1); |
| | | arrayList.add(ByteString.empty()); |
| | | rdn.addValue(name, arrayList, dnString); |
| | | rdnComponents.add(rdn); |
| | |
| | | |
| | | |
| | | // Parse the value for this RDN component. |
| | | parsedValue = new ArrayList<ByteString>(); |
| | | parsedValue = new ArrayList<>(); |
| | | pos = parseValuePattern(dnString, pos, parsedValue); |
| | | |
| | | |
| | |
| | | { |
| | | PatternRDN[] subInitial = null; |
| | | PatternRDN[] subFinal = null; |
| | | List<PatternRDN[]> subAnyElements = new ArrayList<PatternRDN[]>(); |
| | | List<PatternRDN[]> subAnyElements = new ArrayList<>(); |
| | | |
| | | int i = 0; |
| | | int numComponents = rdnComponents.size(); |