[prev in list] [next in list] [prev in thread] [next in thread]
List: openjdk-serviceability-dev
Subject: Re: RFR: 8080272 Refactor I/O stream copying to use java.io.InputStream.transferTo [v8]
From: Сергей =?UTF-8?B?IA==?= =?UTF-8?B?0KbRi9C/0LDQvdC+0LI=?=
Date: 2020-12-21 10:06:01
Message-ID: m7_aUO_Qf7tKkUNuihCnh8Lh83xzYp3AOANwFucPBsE=.201f4482-bd10-4936-b58c-9148b3dd18d3 () github ! com
[Download RAW message or body]
On Mon, 21 Dec 2020 09:51:25 GMT, Andrey Turbanov \
<github.com+741251+turbanoff@openjdk.org> wrote:
> > src/java.base/share/classes/sun/security/tools/keytool/Main.java line 2459:
> >
> > > 2457: byte[] bytes = in.readAllBytes();
> > > 2458: return \
> > > CertificateFactory.getInstance("X509").generateCRLs(
> > > 2459: new ByteArrayInputStream(bytes));
> >
> > Let's just pass `in` into `generateCRLs` instead of reading all bytes and \
> > rewrapping them into `InputStream` again?
>
> Looks like it was done intentionally by original author of the code.
> Check comment above:
>
> // Read the full stream before feeding to X509Factory,
> // otherwise, keytool -gencrl | keytool -printcrl
> // might not work properly, since -gencrl is slow
> // and there's no data in the pipe at the beginning.
Let's keep it then
-------------
PR: https://git.openjdk.java.net/jdk/pull/1853
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic