JDK-8321053 : Use ByteArrayInputStream.buf directly when parameter of transferTo() is trusted
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.io
  • Affected Version: 11,17,21,22
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2023-11-29
  • Updated: 2024-02-14
  • Resolved: 2023-12-05
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 22
22 b27Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
The internal array of bytes in ByteArrayInputStream should be passed to the OutputStream parameter of ByteArrayInputStream.transferTo(OutputStream) only if the latter is in the package java.io.
Comments
AFAICS, this is a long-standing issue introduced by JDK-8180451.
07-12-2023

Changeset: b0d14509 Author: Brian Burkhalter <bpb@openjdk.org> Date: 2023-12-05 19:41:12 +0000 URL: https://git.openjdk.org/jdk/commit/b0d145097cdc61e4bab19393a125e63aa3bc29b9
05-12-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/16893 Date: 2023-11-30 00:03:21 +0000
30-11-2023