error("Unable to cleanup after : findCertificateByIssuerAndSernos()", se);
error("Unable to cleanup after : isRevoked()", se);
	public Collection isRevoked(Admin admin, String issuerDN, Collection sernos) {		debug(">isRevoked()");		Connection con = null;		PreparedStatement ps = null;		ResultSet result = null;		ArrayList vect = null;		if (null == admin			|| null == issuerDN || issuerDN.length() <= 0			|| null == sernos) {			throw new IllegalArgumentException();		}		if (sernos.isEmpty()) {			return new ArrayList();		}		// First make a DN in our well-known format		String dn = CertTools.stringToBCDNString(issuerDN);		if (log.isDebugEnabled()) {			debug("Looking for cert with (transformed)DN: " + dn);		}		try {			final StringBuffer sb = new StringBuffer();			/*			 * tmeckel:			 * why commented out refer to 'findCertificateByIssuerAndSernos'			CollectionUtils.forAllDo(sernos, new Closure() {												public void execute(Object input) {													if (null != input) {														sb.append(", ");														sb.append(input.toString());													}												}} );			*/			{				Iterator iter = sernos.iterator();				while (iter.hasNext()) {                    sb.append(", '");                    // Make sure this is really a BigInteger passed in as (untrusted param)                    BigInteger serno = (BigInteger)iter.next();                     sb.append(serno.toString());                    sb.append("'");				}			}			/*			 * to save the repeating if-statement in the above			 * Closure not to add ', ' as the first characters			 * in the StringBuffer we remove the two chars here :)			 */			sb.delete(0, ", ".length());			con = getConnection();			ps = con.prepareStatement("SELECT DISTINCT serialNumber, revocationDate, revocationReason, status"									  + " FROM CertificateData WHERE"									  + " issuerDN = '" + dn + "'"									  + " AND serialNumber IN (" + sb.toString() + ")");			result = ps.executeQuery();			vect = new ArrayList();			while (result.next()) {				RevokedCertInfo info = new RevokedCertInfo(new BigInteger(result.getBytes(1)), new Date(result.getLong(2)), result.getInt(3));				// Backwards compatibility, handle databases that did not have NOT_REVOKED				if (result.getInt(4) != CertificateData.CERT_REVOKED) {					info.setReason(RevokedCertInfo.NOT_REVOKED);				}				vect.add(info);			}		} catch (Exception e) {			error("Unable to load revoked certificates for issuer '"				  + issuerDN				  + "'"				  , e);			throw new EJBException(e);		} finally {		   try {				if (result != null) {					result.close();				}				if (ps != null) {					ps.close();				}				if (con != null) {					con.close();				}			} catch (SQLException se) {				error("Unable to cleanup after : findCertificateByIssuerAndSernos()", se);			}		}		debug("<isRevoked()");		return vect;	} // isRevoked