activemq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Marbach (JIRA)" <>
Subject [jira] [Commented] (AMQNET-404) ActiveMQByteMessage Content accessing multiple times wipes the property
Date Sat, 19 Jan 2013 21:58:12 GMT


Daniel Marbach commented on AMQNET-404:

Ok. Didn't know that. But this design is completely against the framework design guidelines.
Accessing a property multiple times should return the same result. 
> ActiveMQByteMessage Content accessing multiple times wipes the property
> -----------------------------------------------------------------------
>                 Key: AMQNET-404
>                 URL:
>             Project: ActiveMQ .Net
>          Issue Type: Bug
>          Components: ActiveMQ
>    Affects Versions: 1.5.6
>            Reporter: Daniel Marbach
>            Assignee: Jim Gomes
>            Priority: Minor
> If you have an IBytesMessage and for example do the following:
> byte[] content = null;
> if (message.Content!= null)
> {
>    content  = message.Content;
> }
> Accessing content the first time will return the correct data.
> Accessing a second time the content property will return an empty byte array which has
the length of the data but all bytes are zero.
> It is OK that the content property is evaluated lazily but it should not return different
data when accessing multiple times. So accessing the property the first time should read the
buffer and assign it to a field and then always return that byte buffer.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message