RFR: 8365636: JFR: Minor cleanup [v2]

Erik Gahlin egahlin at openjdk.org
Mon Aug 18 19:08:02 UTC 2025


On Mon, 18 Aug 2025 11:48:31 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:

>> Erik Gahlin has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Compare with class instead incorrect/reversed isAssignableFrom
>
> src/jdk.jfr/share/classes/jdk/jfr/consumer/RecordedObject.java line 186:
> 
>> 184:         }
>> 185:         T object = getValue(name);
>> 186:         if (object == null || object.getClass() == clazz) {
> 
> Comprehension check: looks like do not need to check hierarchy at all, since we only ever call `getTyped` with `final` classes, correct?

We only use the method with known leaf classes, e.g. Long and RecordedThread, which all happen to be final, but hypothetically they would not need to be. The class should match the type that the parser has instantiated.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26811#discussion_r2283210921


More information about the hotspot-jfr-dev mailing list