On Mon, 11 Dec 2023 14:58:57 GMT, Markus KARG <d...@openjdk.org> wrote:
>> Sergey Tsypanov has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev excludes the unrelated changes >> brought in by the merge/rebase. The pull request contains 11 additional >> commits since the last revision: >> >> - Merge branch 'master' into 8320971 >> - 8320971: Rename method >> - 8320971: Extract utility class >> - 8320971: Rearrange code >> - 8320971: Rewrite comment >> - 8320971: Use same approach as BAOS >> - Merge branch 'master' into 8320971 >> - 8320971: Add test >> - 8320971: Trust any OutputStream from java.* >> - 8320971: Use BufferedInputStream.class.getPackageName() >> - ... and 1 more: https://git.openjdk.org/jdk/compare/eacded64...2df52c72 > > src/java.base/share/classes/java/io/ByteArrayInputStream.java line 212: > >> 210: // 'tmpbuf' is null if and only if 'out' is trusted >> 211: byte[] tmpbuf; >> 212: if (IOStreams.isTrusted(out)) > > IMHO we should use `IOStreams.isTrusted(out)` in BAIS, too. BAIS - ByteArrayInputStream? It's already there > src/java.base/share/classes/java/io/IOStreams.java line 26: > >> 24: */ >> 25: >> 26: package java.io; > > As this class is implementation-specific to OpenJDK, we should move it into > the `com.sun` namespace. Done ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1423065992 PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1423064118