private List<PermissionRule> access(String permissionName){
  List<PermissionRule> rules=effective.get(permissionName);
  if (rules != null) {
    return rules;
  }
  rules=capabilities.getPermission(permissionName);
  GroupMembership groups=user.getEffectiveGroups();
  List<PermissionRule> mine=new ArrayList<>(rules.size());
  for (  PermissionRule rule : rules) {
    if (match(groups,rule)) {
      mine.add(rule);
    }
  }
  if (mine.isEmpty()) {
    mine=Collections.emptyList();
  }
  effective.put(permissionName,mine);
  return mine;
}

private List < PermissionRule > access ( String permissionName ) { List < PermissionRule > rules = effective . get ( permissionName ) ; if ( rules != null ) { return rules ; } rules = capabilities . getPermission ( permissionName ) ; GroupMembership groups = user . getEffectiveGroups ( ) ; List < PermissionRule > mine = new ArrayList < > ( rules . size ( ) ) ; for ( PermissionRule rule : rules ) { if ( match ( groups , rule ) ) { mine . add ( rule ) ; } } if ( mine . isEmpty ( ) ) { mine = Collections . emptyList ( ) ; } effective . put ( permissionName , mine ) ; return mine ; }
rules for the given permission , or the empty list .
