You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by "Rajith Attapattu (JIRA)" <ji...@apache.org> on 2010/10/19 00:08:29 UTC
[jira] Resolved: (QPID-2766) string to double conversion results in
questionable precision
[ https://issues.apache.org/jira/browse/QPID-2766?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rajith Attapattu resolved QPID-2766.
------------------------------------
Resolution: Fixed
Fixed and reviewed.
> string to double conversion results in questionable precision
> -------------------------------------------------------------
>
> Key: QPID-2766
> URL: https://issues.apache.org/jira/browse/QPID-2766
> Project: Qpid
> Issue Type: Bug
> Components: Java Client
> Affects Versions: 0.6
> Reporter: Rajith Attapattu
> Assignee: Rajith Attapattu
> Priority: Minor
> Fix For: 0.7
>
>
> The following test:
> public void testString2Double_1() {
> try {
> Message message = senderSession.createMessage();
> message.setStringProperty("pi", "3.14159");
> assertEquals(3.14159, message.getDoubleProperty("pi"),0);
> } catch (JMSException e) {
> fail(e);
> }
> }
> Fails with:
> junit.framework.AssertionFailedError: expected:<3.14159> but
> was:<3.141590118408203>
> This appears to be because the client ends up doing the equivalent of
> Double.valueOf(Float.valueOf(value)) when doing string to double conversion
> rather than the more direct Double.valueOf(value).
--
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