<BUG>int rc = conn.sendRequest(chainCertUri, getSession());if (rc != HttpURLConnection.HTTP_OK) {conn.throwAcmeException();}</BUG><CONTEXT>LOG.debug("downloadChain");List<X509Certificate> certChain = new ArrayList<>();URI link = chainCertUri;while (link != null && certChain.size() < MAX_CHAIN_LENGTH) {try (Connection conn = getSession().provider().connect()) {<extra_id_0>certChain.add(conn.readCertificate());</CONTEXT>
conn.accept(HttpURLConnection.HTTP_OK);