Refinitiv / Real-Time-SDK

Other
191 stars 129 forks source link

EMA C++ FieldEntry header vs impl #262

Closed lubomir-benus closed 4 months ago

lubomir-benus commented 11 months ago

Hi guys,

The FieldEntry header and impl are not in sync (2023-12-28).

In C++ we didn't check for BLANK code and retrieved an empty OmmArray from FieldEntry => no exception In C# we didn't check for BLANK code and retrieved empty OmmArray from FieldEntry => throws OmmInvalidUsageException

Looks like implementation in C++ doesn't follow C++ header documentation (C++ header seems to follow C# logic).

FieldEntry.h contains:

/** Returns current OMM data represented as an OmmArray.
    @throw OmmInvalidUsageException if contained object is not OmmArray
    @throw OmmInvalidUsageException if getCode() returns Data::BlankEnum
    @return OmmArray class reference to contained object
*/
const OmmArray& getArray() const;

FieldEntry.cpp contains:

const OmmArray& FieldEntry::getArray() const { if ( (_pLoad)->getDataType() != DataType::ArrayEnum ) { EmaString temp( "Attempt to getArray() while actual entry data type is " ); temp += getDTypeAsString( (_pLoad)->getDataType() ); throwIueException( temp, OmmInvalidUsageException::InvalidOperationEnum ); }

return static_cast<const OmmArray&>( **_pLoad );

}

vlevendel commented 10 months ago

Thank you for posting this issue. We have created an internal Jira to investigate it.

vlevendel commented 4 months ago

@lubomir-benus Addressed with tag Real-Time-SDK-2.2.1.L1-CppC. Closing. Please reach out if there are more concerns.