spring-projects/spring-ldap

Make NameAwareAttributes Iterable

Opened this issue · 0 comments

Working with NamingEnumerations can be cumbersome. Specifically, since each of its methods throws a checked exception, it can be challenging to use its contents inside of a lambda.

If NameAwareAttributes implements Iterable<NameAwareAttribute>, then aside from it being able to use an enhanced for loop, it can also be converted to a stream and use the Stream API.

When adding this, tests should be added to NameAwareAttributesTests to confirm that iteration works.