code: protected void updateRoles(final LoginContext _login,
                                 final Person _person)
          throws EFapsException
      {
          for (final JAASSystem system : JAASSystem.getAllJAASSystems()) {
              if (system.getRoleJAASPrincipleClass() != null) {
                  final Set<?> rolesJaas = _login.getSubject().getPrincipals(system.getRoleJAASPrincipleClass());
                  final Set<Role> rolesEfaps = new HashSet<>();
                  for (final Object roleObj : rolesJaas) {
                      try {
                          final String roleKey = (String) system.getRoleMethodKey().invoke(roleObj);
                          final Role roleEfaps = Role.getWithJAASKey(system, roleKey);
                          if (roleEfaps != null) {
                              rolesEfaps.add(roleEfaps);
                          }
                      } catch (final IllegalAccessException e) {
                          LoginHandler.LOG.error("could not execute role key method for system " + system.getName(), e);
                      } catch (final IllegalArgumentException e) {
                          LoginHandler.LOG.error("could not execute role key method for system " + system.getName(), e);
                      } catch (final InvocationTargetException e) {
                          LoginHandler.LOG.error("could not execute role key method for system " + system.getName(), e);
                      }
                  }
                  _person.setRoles(system, rolesEfaps);
              }
          }
      }
docs: The roles of the given person are updated with the information from the
  JAAS login context.
  
  @param _login    JAAS login context
  @param _person   person for which the roles must be updated
  @throws EFapsException if a method of the principals inside the JAAS
  login contexts could not be executed or the roles
  for the given person could not be set.