Fix a potential null pointer exception in the DN config attribute that could
occur if it was created with a single DN value and that value is null.
OpenDS Issue Number: 716
| | |
| | | { |
| | | assert debugEnter(CLASS_NAME, "getValueSet", String.valueOf(value)); |
| | | |
| | | LinkedHashSet<AttributeValue> valueSet = |
| | | new LinkedHashSet<AttributeValue>(1); |
| | | |
| | | LinkedHashSet<AttributeValue> valueSet; |
| | | if (value == null) |
| | | { |
| | | valueSet = new LinkedHashSet<AttributeValue>(0); |
| | | } |
| | | else |
| | | { |
| | | valueSet = new LinkedHashSet<AttributeValue>(1); |
| | | valueSet.add(new AttributeValue(new ASN1OctetString(value.toString()), |
| | | new ASN1OctetString(value.toNormalizedString()))); |
| | | } |
| | | |
| | | return valueSet; |
| | | } |