RFR: 8354329: Rewrite runtime/ClassFile/JsrRewriting.java and OomWhileParsingRepeatedJsr.java tests [v3]
Chen Liang
liach at openjdk.org
Tue Apr 29 19:20:49 UTC 2025
On Fri, 25 Apr 2025 14:57:39 GMT, Anton Artemov <duke at openjdk.org> wrote:
>> Rewrote JsrRewriting and OomWhileParsingRepeatedJsr tests so that they are not using jar files, but instead class files are created on the fly using the ASM library.
>>
>> Test in tiers 1-3 on multiple platforms pass.
>
> 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 42:
> 40: */
> 41:
> 42: public class OOMCrashClass4000_1 implements Opcodes {
I recommend static importing fields instead of using implements to inherit the public static final interface fields.
Also, is it possible to just use the ClassFile API?
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.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/24662#discussion_r2067183720
PR Review Comment: https://git.openjdk.org/jdk/pull/24662#discussion_r2067181988
More information about the hotspot-runtime-dev
mailing list