Johan Stenberg created ARTEMIS-1899:
---------------------------------------
Summary: AMQPMessage.getIntProperty() throws "UnsignedInteger
cannot be cast to java.lang.Integer"
Key: ARTEMIS-1899
URL: https://issues.apache.org/jira/browse/ARTEMIS-1899
Project: ActiveMQ Artemis
Issue Type: Bug
Components: AMQP
Affects Versions: 2.6.0
Reporter: Johan Stenberg
While testing a custom Artemis plugin with a RHEA based AMQP client I
encountered the following exception in the server:
{noformat}
23:56:57.993 WARN [y-threads)] ?(:)
org.apache.qpid.proton.amqp.UnsignedInteger cannot be cast to java.lang.Integer
java.lang.ClassCastException: org.apache.qpid.proton.amqp.UnsignedInteger
cannot be cast to java.lang.Integer
at
org.apache.activemq.artemis.protocol.amqp.broker.AMQPMessage.getIntProperty(AMQPMessage.java:987)
~[artemis-amqp-protocol-2.6.0.jar:?]
{noformat}
On the client I am setting a message property with an int value and try to
access this int value in the custom plugin on the server via
AMQPMessage.getIntProperty.
The problem lies in the fact that the AMQPMessage.getIntProperty method simply
tries to cast the property to Integer and does not perform the same conversion
as done by
[getObjectProperty|https://github.com/apache/activemq-artemis/blob/master/artemis-protocols/artemis-amqp-protocol/src/main/java/org/apache/activemq/artemis/protocol/amqp/broker/AMQPMessage.java#L1030].
Same is true for AMQPMessage.getLongProperty.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)