activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Mittler (JIRA)" <j...@apache.org>
Subject [jira] Updated: (AMQCPP-143) declara BytesMessage::readXXX() methods as 'const'
Date Sun, 30 Sep 2007 10:22:22 GMT

     [ https://issues.apache.org/activemq/browse/AMQCPP-143?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Nathan Mittler updated AMQCPP-143:
----------------------------------

    Fix Version/s: 2.2

> declara BytesMessage::readXXX() methods as 'const' 
> ---------------------------------------------------
>
>                 Key: AMQCPP-143
>                 URL: https://issues.apache.org/activemq/browse/AMQCPP-143
>             Project: ActiveMQ C++ Client
>          Issue Type: Improvement
>          Components: CMS Impl
>    Affects Versions: 2.2
>         Environment: language specific, all the platforms
>            Reporter: Matvey Aizenshtat
>            Assignee: Nathan Mittler
>            Priority: Minor
>             Fix For: 2.2
>
>
> BytesMessage readXXX() methods (readBytes() etc) aren't 'const' since the internal stream
state is changed.
> But if only the stream pointer is updated, I suppose we could have another solution here,
i.e.
> declare inputStream field as 'mutable':
> mutable io::ByteArrayInputStream inputStream;
> In that case we could keep read methods const.
> I am requesting for that because at the moment such non-const API forces app level either
always deal with non-const objects or make const_cast<cms::BytesMessage *>(), that's
not good.
> See also:
> http://www.nabble.com/BytesMessage-methods-tf3833767s2354.html#a10853672

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message