You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Martin Ritchie (JIRA)" <qp...@incubator.apache.org> on 2006/12/04 16:44:21 UTC

[jira] Commented: (QPID-148) Field table values are not preserved.

    [ http://issues.apache.org/jira/browse/QPID-148?page=comments#action_12455333 ] 
            
Martin Ritchie commented on QPID-148:
-------------------------------------

This bug was introduced when resolving a crash due to the call to getPropertyNames() throwing a null pointer exception.

This was because the getHeaders() method returned null when there was no FieldTable assigned... Which is the case when there are no properties.

So changed to return a new empty FieldTable which allowed getPropertyNames() to succeed.

The knock on effect was that as the field table now had a value it wasn't created correctly via a setHeaders(FieldTable ft) call which sets the _propertyFlag. This in turn causes the headers to be written to the wire.. without the flag .. there are no properties. 

This error wasn't detected as we had no test cases that checked the properties were correctly preserved.

- I create a new PropertyValueTest that tests all the values and that they are correctly transported.
- I will ensure setHeaders is called where it is required in BasicContentHeaderProperties.getHeaders()
- I will check code base for getHeaders() == null cases and remove accordingly as the method will never return null.

These changes should be completed later today.



> Field table values are not preserved.
> -------------------------------------
>
>                 Key: QPID-148
>                 URL: http://issues.apache.org/jira/browse/QPID-148
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Common
>            Reporter: Martin Ritchie
>         Assigned To: Martin Ritchie
>             Fix For: M2
>
>
> When a message is sent with a custom header property the received message has lost the custom property.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira