diff --git a/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java b/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java index c217037..6cdc3a1 100644 --- a/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java +++ b/ldap-connector/src/main/java/com/innoq/ldap/connector/LdapHelper.java @@ -1134,12 +1134,16 @@ private LdapGroup fillAttributesInGroup(LdapGroup group, Attributes attributes) group.setCn(getAttributeOrNa(attributes, key)); } } - NamingEnumeration members = attributes.get(groupMemberAttribut).getAll(); - while (members.hasMoreElements()) { - String memberDN = (String) members.nextElement(); - member = new LdapUser(getUidForDN(memberDN), this); - member.setDn(memberDN); - group.addUser(member); + + Attribute membersAttribute = attributes.get(groupMemberAttribut); + if (membersAttribute != null) { + NamingEnumeration members = membersAttribute.getAll(); + while (members.hasMoreElements()) { + String memberDN = (String) members.nextElement(); + member = new LdapUser(getUidForDN(memberDN), this); + member.setDn(memberDN); + group.addUser(member); + } } } catch (NamingException ex) { handleNamingException(group, ex);