On Thu, 20 Mar 2025 19:49:33 GMT, David M. Lloyd <d...@openjdk.org> wrote:
> Provide method overloads to the ClassFile interface of the > java.lang.classfile API which allow parsing of classes found in byte buffers > and memory segments, as well as allowing built class files to be output to > these types. src/java.base/share/classes/jdk/internal/classfile/impl/ClassFileImpl.java line 159: > 157: public ClassModel parse(final ByteBuffer bytes) { > 158: // defensive copy > 159: ByteBuffer dup = bytes.duplicate(); The array version has no defensive copy. Doesn't this defeat the performance goal of the API? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24139#discussion_r2006461120