Skip to content

Constant enum not treated as constant in java encoder #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
kdkavanagh opened this issue Apr 18, 2019 · 0 comments
Closed

Constant enum not treated as constant in java encoder #670

kdkavanagh opened this issue Apr 18, 2019 · 0 comments
Labels

Comments

@kdkavanagh
Copy link

Generated encoder put method for constant enum field incorrectly mutates the underlying buffer at offset 0. Decoder works as expected.

  <message id="11" name="NewOrderSingleMarket" description="New Market Order inbound to Aquarius">
    <field description="" id="1" name="OrdType" presence="constant" type="OrdType" valueRef="OrdType.MarketWithProtection"/>
  public NewOrderSingleMarketEncoder ordType(OrdType value) {
    this.buffer.putByte(this.offset + 0, (byte)value.value());
    return this;
  }
@mjpt777 mjpt777 added the bug label Apr 19, 2019
@mjpt777 mjpt777 closed this as completed Apr 19, 2019
agmt pushed a commit to agmt/simple-binary-encoding that referenced this issue May 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants