Skip to content

Commit

Permalink
fix(events): permit JFR Event Types without label attributes (#804)
Browse files Browse the repository at this point in the history
(cherry picked from commit ea87588)
  • Loading branch information
andrewazores authored and mergify[bot] committed Feb 13, 2025
1 parent a04d876 commit 087e182
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,17 @@

@SuppressFBWarnings("EI_EXPOSE_REP")
public record SerializableEventTypeInfo(
String name,
String typeId,
String name,
String description,
String[] category,
Map<String, SerializableOptionDescriptor> options) {

public SerializableEventTypeInfo {
Objects.requireNonNull(name);
Objects.requireNonNull(typeId);
if (name == null) {
name = "";
}
if (description == null) {
description = "";
}
Expand All @@ -61,6 +63,6 @@ public static SerializableEventTypeInfo fromEventTypeInfo(IEventTypeInfo info) {
SerializableOptionDescriptor.fromOptionDescriptor(entry.getValue()));
}

return new SerializableEventTypeInfo(name, typeId, description, category, options);
return new SerializableEventTypeInfo(typeId, name, description, category, options);
}
}

0 comments on commit 087e182

Please sign in to comment.