Remove pointless if
This commit is contained in:
parent
676cddc0d9
commit
04f011b5bf
1 changed files with 14 additions and 16 deletions
|
@ -81,22 +81,20 @@ public class GroupAdapter extends Adapter<GroupModel, Group> {
|
||||||
group.setId(externalId);
|
group.setId(externalId);
|
||||||
group.setExternalId(id);
|
group.setExternalId(id);
|
||||||
group.setDisplayName(displayName);
|
group.setDisplayName(displayName);
|
||||||
if (!members.isEmpty()) {
|
for (String member : members) {
|
||||||
for (String member : members) {
|
Member groupMember = new Member();
|
||||||
Member groupMember = new Member();
|
try {
|
||||||
try {
|
ScimResource userMapping = this.query("findById", member, "User").getSingleResult();
|
||||||
ScimResource userMapping = this.query("findById", member, "User").getSingleResult();
|
logger.debug(userMapping.getExternalId());
|
||||||
logger.debug(userMapping.getExternalId());
|
logger.debug(userMapping.getId());
|
||||||
logger.debug(userMapping.getId());
|
groupMember.setValue(userMapping.getExternalId());
|
||||||
groupMember.setValue(userMapping.getExternalId());
|
URI ref = new URI(String.format("Users/%s", userMapping.getExternalId()));
|
||||||
URI ref = new URI(String.format("Users/%s", userMapping.getExternalId()));
|
groupMember.setRef(ref.toString());
|
||||||
groupMember.setRef(ref.toString());
|
group.addMember(groupMember);
|
||||||
group.addMember(groupMember);
|
} catch (NoResultException e) {
|
||||||
} catch (NoResultException e) {
|
logger.warnf("member %s not found for group %s", member, id);
|
||||||
logger.warnf("member %s not found for group %s", member, id);
|
} catch (URISyntaxException e) {
|
||||||
} catch (URISyntaxException e) {
|
logger.warnf("bad ref uri");
|
||||||
logger.warnf("bad ref uri");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Meta meta = new Meta();
|
Meta meta = new Meta();
|
||||||
|
|
Loading…
Reference in a new issue