code: @Override
    protected List<X509Certificate> createInstance() throws Exception {
      if (this.directory == null) {
        logger.info("Directory {} does not exist - returning empty list");
        return Collections.emptyList();
      }
      Resource[] resources = ResourcePatternUtils.getResourcePatternResolver(resourceLoader).getResources("file:" + this.directory
        .getAbsolutePath() + "/*");
      List<X509Certificate> list = new ArrayList<>();
      for (Resource resource : resources) {
        if (resource.getFile().isDirectory()) {
          continue;
        }
        try {
          X509Certificate cert = X509CertificateUtils.decodeCertificate(resource.getFile());
          list.add(cert);
        }
        catch (Exception e) {
          logger.info("While scanning directory {} for certificates - failed to decode file '{}' - {}",
            this.directory, resource.getFilename(), e.getMessage());
        }
      }
      return list;
    }
docs: {@inheritDoc}