RFR: 8298065: Provide more information in message of NoSuchFieldError [v4]
Ioi Lam
iklam at openjdk.org
Thu Dec 22 21:43:52 UTC 2022
On Thu, 22 Dec 2022 21:27:58 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
>> test/hotspot/jtreg/runtime/linkResolver/NoSuchFieldOutputTest.java line 53:
>>
>>> 51: s = s + "\nz = " + z;
>>> 52: throwTestException("Did not throw NoSuchFieldError", s);
>>> 53: } catch (NoSuchFieldError nsfe) {
>>
>> You could put each field access in a try block and remove all the fields in the second jasm file, so you can test for all the messages specifically. Although the pattern compiler is cool.
>
> Compiling each jasm file after the main file, IS the easiest way to run it outside jtreg.
Here we have very simple conditions to test, so there's no need for NoSuchFieldOutputTest.java to access FieldName.java at all. That's why I propose that all the error conditions should be implemented inside the jasm files alone. NoSuchFieldOutputTest.java can just refer to the error class by name.
-------------
PR: https://git.openjdk.org/jdk/pull/11745
More information about the hotspot-runtime-dev
mailing list