RFR: 8321053: Use ByteArrayInputStream.buf directly when parameter of transferTo() is trusted [v4]
Markus KARG
duke at openjdk.org
Tue Dec 5 07:40:35 UTC 2023
On Mon, 4 Dec 2023 20:16:12 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Pass `ByteArrayInputStream.buf ` directly to the `OutputStream` parameter of `BAIS.transferTo` only if the target stream is in the `java.io` package.
>
> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>
> 8321053: instanceof -> ==
src/java.base/share/classes/java/io/ByteArrayInputStream.java line 213:
> 211: byte[] tmp;
> 212: Class<?> outClass = out.getClass();
> 213: if (outClass.getPackageName().equals("java.io") &&
For what do we need this string-based check here?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16893#discussion_r1415005911
More information about the core-libs-dev
mailing list