code: public void setInitialPolicies(Set<String> initialPolicies) {
          if (initialPolicies != null) {
              for (Iterator<String> i = initialPolicies.iterator();
                          i.hasNext();) {
                  if (!(i.next() instanceof String))
                      throw new ClassCastException("all elements of set must be "
                          + "of type java.lang.String");
              }
              this.unmodInitialPolicies =
                  Collections.unmodifiableSet(new HashSet<String>(initialPolicies));
          } else
              this.unmodInitialPolicies = Collections.<String>emptySet();
      }
docs: Sets the {@code Set} of initial policy identifiers
  (OID strings), indicating that any one of these
  policies would be acceptable to the certificate user for the purposes of
  certification path processing. By default, any policy is acceptable
  (i.e. all policies), so a user that wants to allow any policy as
  acceptable does not need to call this method, or can call it
  with an empty {@code Set} (or {@code null}).
  <p>
  Note that the {@code Set} is copied to protect against
  subsequent modifications.
  
  @param initialPolicies a {@code Set} of initial policy
  OIDs in {@code String} format (or {@code null})
  @throws ClassCastException if any of the elements in the set are
  not of type {@code String}
  
  @see #getInitialPolicies