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

Rob Godfrey reassigned QPID-2770:
---------------------------------

    Assignee: Rob Godfrey  (was: Rajith Attapattu)
    
> AMQMessageDelegate_0_10 uses Byte.valueOf() when converting String properties 
> to short, int, and long values
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: QPID-2770
>                 URL: https://issues.apache.org/jira/browse/QPID-2770
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Client
>    Affects Versions: M4, 0.5, 0.6
>            Reporter: Robbie Gemmell
>            Assignee: Rob Godfrey
>
> AMQMessageDelegate_0_10 uses Byte.valueOf() when converting String properties 
> to short, int, and long values. When setStringProperty() is used to to set a 
> value and this is to be retrieved via getShortProperty(), getIntProperty(), 
> getLongProperty() methods then the conversion is delegated to the next lowest 
> property type and eventually to the getByteProperty() method and is thus 
> likely not to function correctly.
> Each of the short, int, and long property retrieval methods should directly 
> convert the String instead of delegating to the lower property method.
> Eg, getLongProperty which delegates the String to getIntProperty, which 
> delegates it to getShortProperty() and eventually getByteProperty():
>         if(o instanceof Long)
>         {
>             return ((Long)o).longValue();
>         }
>         else
>         {
>             try
>             {
>                 return Long.valueOf(getIntProperty(propertyName));
>             }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:[email protected]

Reply via email to