Mercurial > hg > openjdk > lambda > jaxp
changeset 492:659828443145
8015978: Incorrect transformation of XPath expression "string(-0)"
Reviewed-by: darcy, joehw
Contributed-by: aleksej.efimov@oracle.com
author | coffeys |
---|---|
date | Fri, 14 Jun 2013 15:14:49 +0400 |
parents | 5c84d4a878f1 |
children | 2707f600a096 |
files | src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java Mon Jun 10 14:42:57 2013 -0700 +++ b/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java Fri Jun 14 15:14:49 2013 +0400 @@ -952,9 +952,12 @@ return result; } else { - if (Double.isNaN(d) || Double.isInfinite(d)) + if (!Double.isFinite(d)) return(Double.toString(d)); + //Convert -0.0 to +0.0 other values remains the same + d = d + 0.0; + // Use the XPath formatter to ignore locales StringBuffer result = threadLocalStringBuffer.get(); result.setLength(0);