code: public void setCertStores(List<CertStore> stores) {
          if (stores == null) {
              this.certStores = new ArrayList<CertStore>();
          } else {
              for (Iterator<CertStore> i = stores.iterator(); i.hasNext();) {
                  if (!(i.next() instanceof CertStore)) {
                      throw new ClassCastException("all elements of list must be "
                          + "of type java.security.cert.CertStore");
                  }
              }
              this.certStores = new ArrayList<CertStore>(stores);
          }
      }
docs: Sets the list of {@code CertStore}s to be used in finding
  certificates and CRLs. May be {@code null}, in which case
  no {@code CertStore}s will be used. The first
  {@code CertStore}s in the list may be preferred to those that
  appear later.
  <p>
  Note that the {@code List} is copied to protect against
  subsequent modifications.
  
  @param stores a {@code List} of {@code CertStore}s (or
  {@code null})
  @throws ClassCastException if any of the elements in the list are
  not of type {@code java.security.cert.CertStore}
  
  @see #getCertStores