try {
DirContext ctx = helper.open();
try {
// Do exact lookups until there are at least 3 characters.
name = Rdn.escapeValue(name) + ((name.length() >= 3) ? "*" : "");
LdapSchema schema = helper.getSchema(ctx);
ParameterizedString filter = ParameterizedString.asis(
schema.groupPattern.replace(GROUPNAME, name).toString());
Set<String> returnAttrs = Collections.<String>emptySet();
Map<String, String> params = Collections.emptyMap();
for (String groupBase : schema.groupBases) {