| | |
| | | if (attrNameList == null || attrNameList.isEmpty()) |
| | | { |
| | | // Common case: return filtered user attributes. |
| | | userAttrsCopy = |
| | | new HashMap<AttributeType, List<Attribute>>(userAttributes.size()); |
| | | operationalAttrsCopy = new HashMap<AttributeType, List<Attribute>>(0); |
| | | userAttrsCopy = new LinkedHashMap<AttributeType, List<Attribute>>( |
| | | userAttributes.size()); |
| | | operationalAttrsCopy = |
| | | new LinkedHashMap<AttributeType, List<Attribute>>(0); |
| | | |
| | | if (omitReal) |
| | | { |
| | | objectClassesCopy = new HashMap<ObjectClass, String>(0); |
| | | objectClassesCopy = new LinkedHashMap<ObjectClass, String>(0); |
| | | } |
| | | else if (omitValues) |
| | | { |
| | | objectClassesCopy = new HashMap<ObjectClass, String>(0); |
| | | objectClassesCopy = new LinkedHashMap<ObjectClass, String>(0); |
| | | |
| | | // Add empty object class attribute. |
| | | userAttrsCopy.put(ocType, newList(Attributes.empty(ocType))); |
| | | } |
| | | else |
| | | { |
| | | objectClassesCopy = new HashMap<ObjectClass, String>(objectClasses); |
| | | objectClassesCopy = |
| | | new LinkedHashMap<ObjectClass, String>(objectClasses); |
| | | |
| | | // First, add the objectclass attribute. |
| | | Attribute ocAttr = getObjectClassAttribute(); |
| | |
| | | // Incrementally build table of attributes. |
| | | if (omitReal || omitValues) |
| | | { |
| | | objectClassesCopy = new HashMap<ObjectClass, String>(0); |
| | | objectClassesCopy = new LinkedHashMap<ObjectClass, String>(0); |
| | | } |
| | | else |
| | | { |
| | | objectClassesCopy = |
| | | new HashMap<ObjectClass, String>(objectClasses.size()); |
| | | new LinkedHashMap<ObjectClass, String>(objectClasses.size()); |
| | | } |
| | | |
| | | userAttrsCopy = |
| | | new HashMap<AttributeType, List<Attribute>>(userAttributes.size()); |
| | | userAttrsCopy = new LinkedHashMap<AttributeType, List<Attribute>>( |
| | | userAttributes.size()); |
| | | operationalAttrsCopy = |
| | | new HashMap<AttributeType, List<Attribute>>( |
| | | new LinkedHashMap<AttributeType, List<Attribute>>( |
| | | operationalAttributes.size()); |
| | | |
| | | for (String attrName : attrNameList) |