RFR: 8320360: ClassFile.parse: Some defect class files cause unexpected exceptions to be thrown [v2]

Adam Sotona asotona at openjdk.org
Tue Jan 2 12:49:48 UTC 2024


On Tue, 2 Jan 2024 12:41:08 GMT, Adam Sotona <asotona at openjdk.org> wrote:

>> src/java.base/share/classes/jdk/internal/classfile/impl/ClassReaderImpl.java line 283:
>> 
>>> 281:     public void copyBytesTo(BufWriter buf, int p, int len) {
>>> 282:         try {
>>> 283:             buf.writeBytes(buffer, p, len);
>> 
>> `java.lang.classfile.BufWriter` doesn't specify any `@throws` for its `writeXXX` methods. Should it be specified (of course in a separate PR)?
>
> That is a good point, thanks!

I've created [JDK-8322847](https://bugs.openjdk.org/browse/JDK-8322847)

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16762#discussion_r1439418563


More information about the core-libs-dev mailing list