RFR: 8292177: InitialSecurityProperty JFR event [v3]

Jaikiran Pai jpai at openjdk.org
Mon Oct 10 13:23:14 UTC 2022


On Mon, 10 Oct 2022 11:29:52 GMT, Erik Gahlin <egahlin at openjdk.org> wrote:

>> src/jdk.jfr/share/classes/jdk/jfr/events/InitialSecurityPropertyEvent.java line 33:
>> 
>>> 31: @Category({"Java Development Kit", "Security"})
>>> 32: @Label("Initial Security Property")
>>> 33: @Name("jdk.InitialSecurityProperty")
>> 
>> Should we name this to `jdk.InitialSecurityProperties` and the label to `Initial Security Properties`, to be more accurate?
>
> There is one property per event, so it uses the same naming convention as jdk.InitialSystemProperty

You are right indeed - I overlooked the part where this PR loops over these properties and creates one event per property.

>> src/jdk.jfr/share/classes/jdk/jfr/events/InitialSecurityPropertyEvent.java line 35:
>> 
>>> 33: @Name("jdk.InitialSecurityProperty")
>>> 34: @Description("Initial Security Properties")
>>> 35: public final class InitialSecurityPropertyEvent extends AbstractJDKEvent {
>> 
>> The event naming guidelines here https://docs.oracle.com/en/java/javase/17/jfapi/guidelines-naming-and-labeling-events.html recommend leaving out `Event` from the class name. So, maybe we should call this `InitialSecurityProperties`?
>
> The documentation is somewhat misleading. If the event has a name annotation, I think it's fine to call the class Event, because name will override the class name.

Thank you Erik for that detail. Looks fine to me then.

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

PR: https://git.openjdk.org/jdk/pull/10394



More information about the security-dev mailing list