qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robbie Gemmell (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (QPID-2770) AMQMessageDelegate_0_10 uses Byte.valueOf() when converting String properties to short, int, and long values
Date Mon, 20 Feb 2012 14:22:32 GMT

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

Robbie Gemmell resolved QPID-2770.
----------------------------------

    Resolution: Fixed
    
> 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, 0.14
>            Reporter: Robbie Gemmell
>            Assignee: Robbie Gemmell
>             Fix For: 0.15
>
>
> 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:dev-subscribe@qpid.apache.org


Mime
View raw message