code: @Override
      public boolean isGranted(String resourceName, Collection<String> requiredRoles,
                               Collection<String> assignedRoles, Subject subject) {
  
          /*
           * New for Servlet 3.1 "**" means all authenticated users. The subject
           * is checked prior to isGranted() being called. So return true if the
           * subject is not null and if "**" is a required role.
           * 
           * If "_starstar_" is passed in that means a user had defined a role called
           * "**". We need to convert "_starstar_" back to "**" before the check
           * against assignedRoles.
           */
          if (subject != null && requiredRoles.contains(ALL_AUTHENTICATED_ROLE) && isEEVersionAtLeast7())
              return true;
  
          if (assignedRoles != null) {
  
              Iterator<String> iter = requiredRoles.iterator();
              while (iter.hasNext()) {
                  String r = iter.next();
                  if (r.equals(STARSTAR_ROLE))
                      r = "**";
                  if (assignedRoles.contains(r)) {
                      return true;
                  }
              }
          }
          return false;
      }
docs: {@inheritDoc}<p>
  The Subject is not actually used here as the assigned roles have
  already been computed.