code: private void validateInput(String resourceName, Collection<String> requiredRoles) {
          if (requiredRoles == null) {
              throw new NullPointerException("requiredRoles cannot be null.");
          } else if (resourceName == null) {
              throw new NullPointerException("resourceName cannot be null.");
          }
      }
docs: Validate that the input parameters are not null.
  
  @param resourceName
  the name of the resource
  @param requiredRoles
  the Collection of required roles
  @throws NullPointerException
  when either input is null