[
https://issues.apache.org/jira/browse/PROTON-1288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16025716#comment-16025716
]
ASF subversion and git services commented on PROTON-1288:
---------------------------------------------------------
Commit f66938024bbb85036aa30ad42e014b912435cacd in qpid-proton's branch
refs/heads/master from [~aconway]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=f669380 ]
PROTON-1288: c++ fix caching bug in proton::map
Discovered using quiver tests: `quiver foo --impl=qpid-proton-cpp`
map::clear() did not invalidate the cache as required by message::encode()
to ensure that newly-decoded map values updated the caches correctly.
Simplified the cache logic.
> c++ provide access to message maps as proton::value
> ---------------------------------------------------
>
> Key: PROTON-1288
> URL: https://issues.apache.org/jira/browse/PROTON-1288
> Project: Qpid Proton
> Issue Type: Bug
> Components: cpp-binding
> Affects Versions: 0.14.0, 0.15.0
> Reporter: Alan Conway
> Assignee: Alan Conway
> Fix For: 0.18.0
>
>
> We need to provide access to the message property maps as a proton::value.
> Given
> {code}
> std::map<string, scalar> my_map;
> proton::message m;
> {code}
> Here are some options:
> 1. Add new message accessor: proton::value& properties_value()
> proton::get(m.properties_value(), my_map)
> 2. Add value() accessor to cached_map
> proton::get(m.properties().value(), my_map)
> 3. Make cached_map : public proton::value()
> proton::get(m.properties(), my_map)
> 3 is neatest, 1 provides a clearer separation between the case where you want
> a convenient cached map vs. you want to decode to your own C++ map, work on
> it, and possibly re-encode it later. I lean towards 3. but open to persuasion.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]