Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
Jena 2.11.2
-
None
Description
There is an bug in NodeId. extract(NodeId nodeId)
case DECIMAL: { BigDecimal d = DecimalNode.unpackAsBigDecimal(v) ; String x = d.toEngineeringString() ; return NodeFactory.createLiteral(x, null, XSDDatatype.XSDdecimal) ; }
NodeFactory.createLiteral is expecting that x will be valid lexical form, while d.toEngineeringString() is not.
It should be:
case DECIMAL: { BigDecimal d = DecimalNode.unpackAsBigDecimal(v) ; String x = d.toPlainString() ; return NodeFactory.createLiteral(x, null, XSDDatatype.XSDdecimal) ; }