Closed
Description
I don't have a need for schemaID in the MessageHeader and have set it to a constant in the XML. This runs through the sbe-tool without complaints, however the generated wrapAndApplyHeader methods still try to apply the schemaID, ignoring the fact that it is a constant.
XML:
<composite name="messageHeader" description="Message identifiers and length of message root">
<type name="msgSize" primitiveType="uint16"/>
<type name="templateId" primitiveType="uint16"/>
<type name="version" primitiveType="uint16"/>
<type name="blockLength" primitiveType="uint16"/>
<type name="schemaId" primitiveType="uint16" presence="constant">1</type>
</composite>
Generated java:
public TestFixedWidthMessageEncoder wrapAndApplyHeader(
final MutableDirectBuffer buffer, final int offset, final MessageHeaderEncoder headerEncoder)
{
headerEncoder
.wrap(buffer, offset)
.blockLength(BLOCK_LENGTH)
.templateId(TEMPLATE_ID)
.schemaId(SCHEMA_ID)
.version(SCHEMA_VERSION);
return wrap(buffer, offset + MessageHeaderEncoder.ENCODED_LENGTH);
}
Metadata
Metadata
Assignees
Labels
No labels