Skip to content
Permalink
Browse files

8239585: JFR: Native events should support empty payloads

Reviewed-by: mgronlun
  • Loading branch information
Erik Gahlin
Erik Gahlin committed Feb 24, 2020
1 parent bb7344d commit 266446f316534dd19323f2e74395f10c6eb86e1a
@@ -636,6 +636,12 @@ private static void printCommitMethod(Printer out, EventElement event, boolean e
}
out.write(" }");
}

// Avoid clash with static commit() method
if (event.fields.isEmpty()) {
return;
}

out.write("");
StringJoiner sj = new StringJoiner(",\n ");
if (event.startTime) {
@@ -45,7 +45,7 @@
<xs:element maxOccurs="unbounded" name="Event">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Field">
<xs:element minOccurs="0" maxOccurs="unbounded" name="Field">
<xs:complexType>
<xs:attribute name="type" type="xs:NMTOKEN" use="required" />
<xs:attribute name="struct" type="xs:boolean" use="optional" />

0 comments on commit 266446f

Please sign in to comment.