You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2014/06/20 11:58:24 UTC
[jira] [Commented] (JENA-720) NodeId does not handle BigDecimal
correctly
[ https://issues.apache.org/jira/browse/JENA-720?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038632#comment-14038632 ]
ASF subversion and git services commented on JENA-720:
------------------------------------------------------
Commit 1604120 from [~andy.seaborne] in branch 'jena/trunk'
[ https://svn.apache.org/r1604120 ]
JENA-720 - Avoid engineering notation when recovering xsd:decimal values.
> NodeId does not handle BigDecimal correctly
> -------------------------------------------
>
> Key: JENA-720
> URL: https://issues.apache.org/jira/browse/JENA-720
> Project: Apache Jena
> Issue Type: Bug
> Components: TDB
> Affects Versions: TDB 1.0.1
> Reporter: Marek Kowalczyk
> Attachments: JENA-720.patch
>
>
> There is an bug in NodeId. extract(NodeId nodeId)
> {code}
> case DECIMAL:
> {
> BigDecimal d = DecimalNode.unpackAsBigDecimal(v) ;
> String x = d.toEngineeringString() ;
> return NodeFactory.createLiteral(x, null, XSDDatatype.XSDdecimal) ;
> }
> {code}
> NodeFactory.createLiteral is expecting that x will be valid lexical form, while d.toEngineeringString() is not.
> It should be:
> {code}
> case DECIMAL:
> {
> BigDecimal d = DecimalNode.unpackAsBigDecimal(v) ;
> String x = d.toPlainString() ;
> return NodeFactory.createLiteral(x, null, XSDDatatype.XSDdecimal) ;
> }
> {code}
--
This message was sent by Atlassian JIRA
(v6.2#6252)