Skip to content

ETA/ETA ValueAdd Java examples doesn't call releaseBuffer on errors #326

@uc-gmilza

Description

@uc-gmilza

I was checking the examples of ETA ValueAdd Java and i noticed that in basically all examples when a TransportBuffer is obtained, it is never freed in case of message encoding errors or ReactorChannel.submit failure.

According to the PDF ETAJ_DevGuide.pdf/ETAJ_ValueAddDevGuide.pdf (downloaded from LSEG website, as the one here in github looks corrupted) if the buffer is not populated (i assume that means that we return from encoding before submit, even with no or partial encoding done) or the submit call fails, ReactorChannel.releaseBuffer should be called.

The examples never do that, here two cases:

  • sendOnstreamPostMsg/sendOffstreamPostMsg PostHandler.java
  • sendItemResponse ItemHandler
    But it seems to me that pretty much every time a TransportBuffer is obtained in the examples code, it is not freed in case of errors.

The corresponding c versions do that: rsslPostHandler.c

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