qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Toralf Lund (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (QPID-6669) Integer variants not convertible to double
Date Fri, 31 Jul 2015 06:58:05 GMT

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

Toralf Lund updated QPID-6669:
------------------------------
    Description: 
QPid Variants, and by extension message properties, of "integer" types cannot be converted
to floating-point, even thought there is no obvious reason why this shouldn't be possible.

I found out about this when using a construct of the form
{code}
uint32 inValue=...;
message.setProperty("property", inValue);
{code}
in a message sender, and 
{code}
double value=message.getProperties()["property"];
{code}
at the receiving end. This lead to an _InvalidConversion_ exception, with the message
{quote}
Cannot convert from uint32 to double (qpid/types/Variant.cpp:488)
{quote}

  was:
QPid::Variants, and by extension message properties, of "integer" types cannot be converted
to floating-point, even thought there is no obvious reason why this shouldn't be possible.

I found out about this when using a construct of the form
{code}
uint32 inValue=...;
message.setProperty("property", inValue);
{code}
in a message sender, and 
{code}
double value=message.getProperties()["property"];
{code}
at the receiving end. This lead to an _InvalidConversion_ exception, with the message
{quote}
Cannot convert from uint32 to double (qpid/types/Variant.cpp:488)
{quote}


> Integer variants not convertible to double
> ------------------------------------------
>
>                 Key: QPID-6669
>                 URL: https://issues.apache.org/jira/browse/QPID-6669
>             Project: Qpid
>          Issue Type: Bug
>          Components: C++ Client
>            Reporter: Toralf Lund
>
> QPid Variants, and by extension message properties, of "integer" types cannot be converted
to floating-point, even thought there is no obvious reason why this shouldn't be possible.
> I found out about this when using a construct of the form
> {code}
> uint32 inValue=...;
> message.setProperty("property", inValue);
> {code}
> in a message sender, and 
> {code}
> double value=message.getProperties()["property"];
> {code}
> at the receiving end. This lead to an _InvalidConversion_ exception, with the message
> {quote}
> Cannot convert from uint32 to double (qpid/types/Variant.cpp:488)
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message