code: @SuppressWarnings("unchecked")
      private boolean getCerts(AuthorityInfoAccessExtension aiaExt,
                               Collection<X509Certificate> certs)
      {
          if (Builder.USE_AIA == false) {
              return false;
          }
          List<AccessDescription> adList = aiaExt.getAccessDescriptions();
          if (adList == null || adList.isEmpty()) {
              return false;
          }
  
          boolean add = false;
          for (AccessDescription ad : adList) {
              CertStore cs = URICertStore.getInstance(ad);
              if (cs != null) {
                  try {
                      if (certs.addAll((Collection<X509Certificate>)
                          cs.getCertificates(caSelector))) {
                          add = true;
                          if (!searchAllCertStores) {
                              return true;
                          }
                      }
                  } catch (CertStoreException cse) {
                      if (debug != null) {
                          debug.println("exception getting certs from CertStore:");
                          cse.printStackTrace();
                      }
                  }
              }
          }
          return add;
      }
docs: because of the selector, so the cast is safe