code: protected void validateProfile(String profile) {
          if (!StringUtils.hasText(profile)) {
              throw new IllegalArgumentException("Invalid profile [" + profile + "]: must contain text");
          }
          if (profile.charAt(0) == '!') {
              throw new IllegalArgumentException("Invalid profile [" + profile + "]: must not begin with ! operator");
          }
      }
docs: Validate the given profile, called internally prior to adding to the set of
  active or default profiles.
  <p>Subclasses may override to impose further restrictions on profile syntax.</p>
  
  @param profile the given profile
  @throws IllegalArgumentException if the profile is null, empty, whitespace-only or
  begins with the profile NOT operator (!)
  @see #acceptsProfiles
  @see #setDefaultProfiles