Skip to content

Commit

Permalink
Refs #20733: Fix support for key annotation in XML types
Browse files Browse the repository at this point in the history
Signed-off-by: eduponz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz committed Apr 17, 2024
1 parent a35c846 commit ab60fe9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions resources/xsd/fastRTPS_profiles.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@
<xs:attribute name="sequenceMaxLength" type="int32" use="optional"/>
<xs:attribute name="arrayDimensions" type="arrayDim" use="optional"/>
<xs:attribute name="key_type" type="string" use="optional"/>
<xs:attribute name="key" type="string" use="optional"/>
<xs:attribute name="mapMaxLength" type="int32" use="optional"/>
</xs:complexType>

Expand Down
4 changes: 2 additions & 2 deletions src/cpp/rtps/xmlparser/XMLDynamicParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1400,10 +1400,10 @@ p_dynamictypebuilder_t XMLParser::parseXMLMemberDynamicType(
{
if (strncmp(memberTopicKey, "true", 5) == 0)
{
memberBuilder->apply_annotation(types::ANNOTATION_KEY_ID, "value", "true");
memberBuilder->apply_annotation(types::ANNOTATION_KEY_ID, "key", "true");
if (p_dynamictype != nullptr)
{
p_dynamictype->apply_annotation(types::ANNOTATION_KEY_ID, "value", "true");
p_dynamictype->apply_annotation(types::ANNOTATION_KEY_ID, "key", "true");
}
}
}
Expand Down

0 comments on commit ab60fe9

Please sign in to comment.