code: public void setActiveProfiles(String... profiles) {
          if (profiles == null) {
              throw new IllegalArgumentException("profiles must not be null");
          }
          synchronized (activeProfiles) {
              activeProfiles.clear();
              for (String profile : profiles) {
                  validateProfile(profile);
                  activeProfiles.add(profile);
              }
          }
      }
docs: Specify the set of profiles active for this {@code Environment}.
  Profiles are evaluated during the ActivityContext configuration to determine
  whether configuration settings or rules should be registered.
  <p>Any existing active profiles will be replaced with the given arguments; call
  with zero arguments to clear the current set of active profiles.</p>
  
  @param profiles the set of profiles active
  @see #setDefaultProfiles
  @throws IllegalArgumentException if any profile is null, empty or whitespace-only