class ZMSImpl implements Authorizer, KeyStore, ZMSHandler {

    void normalizeRoleMembers(Role role) {

        Map<String, RoleMember> normalizedMembers = new HashMap<>();

        // normalize getMembers() first

        List<String> members = role.getMembers();
        if (members != null) {
            for (String memberOld : members) {
                RoleMember member = new RoleMember().setMemberName(memberOld);
                if (addNormalizedRoleMember(normalizedMembers, member)) {
                    member.setPrincipalType(principalType(member.getMemberName()));
                }
            }
        }

        // normalize getRoleMembers() now

        List<RoleMember> roleMembers = role.getRoleMembers();
        if (roleMembers != null) {
            for (RoleMember member : roleMembers) {
                if (addNormalizedRoleMember(normalizedMembers, member)) {
                    member.setPrincipalType(principalType(member.getMemberName()));
                }
            }
        }

        role.setRoleMembers(new ArrayList<>(normalizedMembers.values()));
        role.setMembers(null);
    }

    public  ZMSImpl();

}