Collection certs = hardtokensession.findCertificatesInHardToken(administrator, tokensn);  UserAdminData user = adminsession.findUser(administrator, username);  if(!certs.isEmpty()){ Iterator j = certs.iterator(); certificates = new CertificateView[certs.size()]; for(int i=0; i< certificates.length; i++){ RevokedInfoView revokedinfo = null; X509Certificate cert = (X509Certificate) j.next(); RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, CertTools.getIssuerDN(cert), cert.getSerialNumber()); if(revinfo != null) revokedinfo = new RevokedInfoView(revinfo); certificates[i] = new CertificateView(cert, revokedinfo, username);
Collection certs = hardtokensession.findCertificatesInHardToken(administrator, tokensn);  if(!certs.isEmpty()){ Iterator j = certs.iterator(); certificates = new CertificateView[certs.size()]; for(int i=0; i< certificates.length; i++){ RevokedInfoView revokedinfo = null; X509Certificate cert = (X509Certificate) j.next(); RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, CertTools.getIssuerDN(cert), cert.getSerialNumber()); if(revinfo != null) { revokedinfo = new RevokedInfoView(revinfo); } certificates[i] = new CertificateView(cert, revokedinfo, username); }
    public void loadTokenCertificates(String tokensn, String username) throws RemoteException, NamingException, CreateException, AuthorizationDeniedException, FinderException{      Collection certs = hardtokensession.findCertificatesInHardToken(administrator, tokensn);      UserAdminData user = adminsession.findUser(administrator, username);      if(!certs.isEmpty()){        Iterator j = certs.iterator();        certificates = new CertificateView[certs.size()];        for(int i=0; i< certificates.length; i++){          RevokedInfoView revokedinfo = null;          X509Certificate cert = (X509Certificate) j.next();          RevokedCertInfo revinfo = certificatesession.isRevoked(administrator, CertTools.getIssuerDN(cert), cert.getSerialNumber());          if(revinfo != null)            revokedinfo = new RevokedInfoView(revinfo);           certificates[i] = new CertificateView(cert, revokedinfo, username);        }      }      else{        certificates = null;      }    }