RFR: 8354329: Rewrite runtime/ClassFile/JsrRewriting.java and OomWhileParsingRepeatedJsr.java tests [v3]

Anton Artemov duke at openjdk.org
Wed Apr 30 08:47:30 UTC 2025


On Tue, 29 Apr 2025 19:16:31 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Anton Artemov has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8354329: Got rid of obsolete Applet inheritance, not inheriting from Object.
>
> test/hotspot/jtreg/runtime/ClassFile/OOMCrashClass4000_1.java line 48:
> 
>> 46:         ClassWriter classWriter = new ClassWriter(0);
>> 47:         FieldVisitor fieldVisitor;
>> 48:         RecordComponentVisitor recordComponentVisitor;
> 
> Why is this local variable even defined? Record components exist after 16 (or 14 preview) but JSR is already obsolete by 7.

This source file was generated by the an internal component of the ASM library from a given class file, namely as follows:
java jdk.internal.org.objectweb.asm.util.ASMifier OOMCrashClass4000_1.class >> OOMCrashClass4000_1.java

The only modification I applied is that I refactored the code a bit, otherwise the generated java source file was way too big (more than 2 mb).

But you are right, these components are not needed and can be removed. I removed it in the latest commit.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24662#discussion_r2068182563


More information about the hotspot-runtime-dev mailing list