The APIs in jdk.jfr and jdk.management.jfr modules uses Objects.requireNonNull to help users understand an incorrect parameter was passed to a method (and not a potential bug in the JFR implementation). The guard also prevents obscure bugs later because null was incorrectly used (fail fast).
Most of these places use Objects.requireNonNull(parameter, "parameter"), so users know which parameter was wrong, not just the method. Still, there are few places where this is not the case, for example EventStream::onEvent(...).
This should be fixed
Most of these places use Objects.requireNonNull(parameter, "parameter"), so users know which parameter was wrong, not just the method. Still, there are few places where this is not the case, for example EventStream::onEvent(...).
This should be fixed