public static String[] buildLookupAttributeIds( BinaryAttributeDetector binaryAttrDetector, @Nullable Set<Attribute> attrs) { // noinspection ConstantConditions return (!CollectionUtils.isEmpty(attrs) ? ToolCollectionUtils.toArray( CollectionUtils.select( IteratorUtils.asIterable( ToolIteratorUtils.chainedArrayIterator( CollectionUtils.collect( attrs, new LdapAttributeIdTransformer(binaryAttrDetector)))), PredicateUtils.uniquePredicate()), String.class) : ArrayUtils.EMPTY_STRING_ARRAY); }