You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Robbie Gemmell (JIRA)" <qp...@incubator.apache.org> on 2010/07/28 13:15:17 UTC
[jira] Created: (QPID-2770) AMQMessageDelegate_0_10 uses
Byte.valueOf() when converting String properties to short, int, and long
values
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: 0.6, 0.5, M4
Reporter: Robbie Gemmell
Fix For: 0.7
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.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:dev-subscribe@qpid.apache.org