Skip to content

Compilation errors when specifying large Repeating Groups #609

Closed

Description

@RichardWarburton

If you want to encode repeating groups larger than a uint16 then you need to specify an increase in the size of the block length property:

<composite name="groupSizeEncoding" description="Repeating group dimensions" >
    <type name="blockLength" primitiveType="uint32"/>
    <type name="numInGroup" primitiveType="uint16" semanticType="NumInGroup"/>
</composite>

But if you do this then SBE will generate Java code with a compilation error in:

RedactedDecoder.java:121: error: incompatible types: possible lossy conversion from long to int
            blockLength = dimensions.blockLength();

I can understand if you don't wish to support block lengths larger than a uint16 but I think doing this with SBE validation rather than generated invalid Java code would be a better approach.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions