On Tue, 19 Dec 2023 12:21:05 GMT, Raffaello Giulietti <[email protected]>
wrote:
>> Adds serialization misdeclaration events to JFR.
>
> Raffaello Giulietti has updated the pull request incrementally with one
> additional commit since the last revision:
>
> Better name for a label, corrected name of removed field.
test/jdk/jdk/jfr/event/io/TestSerializationMisdeclarationEvent.java line 144:
> 142: }
> 143:
> 144: static {
It's a bit odd for a test case to be doing this in a static block. Could this
instead be done in a `org.junit.jupiter.api.BeforeAll` method:
import org.junit.jupiter.api.BeforeAll;
...
@BeforeAll
static void recordEvents() {
.... // that static block's code here
}
Any (unexpected) failures in that method will then be reported in a better way
by the testing framework instead of an `ExceptionInInitializer` that would be
reported from a failure in static block and the test class itself failing to
load.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/17129#discussion_r1431571145