final EOFException eof = new EOFException("Failed to recover data from Write-Ahead Log Partition because encountered trailing NUL bytes. " + "This will sometimes happen after a sudden power loss. The rest of this journal file will be skipped for recovery purposes."); eof.addSuppressed(e); throw eof; } else {
} catch (final EOFException eof) { final EOFException exception = new EOFException("Failed to read field '" + field.getFieldName() + "'"); exception.addSuppressed(eof); throw exception; } catch (final IOException ioe) {
sourceConduit.terminateReads(); } catch (IOException e) { exception.addSuppressed(e);
@Override public void call(ByteBuffer buffer) throws SSLException { // read csr ByteSource chunk = ByteSource.wrap(buffer.array()).slice(buffer.arrayOffset(), buffer.position()); ByteSource source = (data == null) ? chunk : ByteSource.concat(data, chunk); try { PKCS10CertificationRequest csr = new PKCS10CertificationRequest(source.read()); // generate proxy ProxyRequestOptions options = new ProxyRequestOptions(credential.getCertificateChain(), csr); options.setLimited(isDelegationLimited); X509Certificate[] chain = ProxyGenerator.generate(options, credential.getKey()); // send to server send(ByteBuffer.wrap(chain[0].getEncoded())); } catch (EOFException f) { try { /* Incomplete - read another frame. */ ByteSource copy = ByteSource.wrap(chunk.read()); data = (data == null) ? copy : ByteSource.concat(data, copy); receive(this); } catch (IOException e) { f.addSuppressed(e); } } catch (CertificateParsingException | NoSuchAlgorithmException | NoSuchProviderException | SignatureException | CertificateEncodingException | InvalidKeyException | IOException e) { throw new SSLException("GSI delegation failed: " + e.toString(), e); } } }
sourceConduit.terminateReads(); } catch (IOException e) { exception.addSuppressed(e);