changeset 845:b959344c448a

8015978: Incorrect transformation of XPath expression "string(-0)" Reviewed-by: darcy, joehw
author aefimov
date Wed, 24 Jul 2013 15:21:29 +0400
parents 52cf85c67582
children cb54cc83d8be
files src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Wed Jul 24 14:58:32 2013 +0400
+++ b/src/com/sun/org/apache/xalan/internal/xsltc/runtime/BasisLibrary.java	Wed Jul 24 15:21:29 2013 +0400
@@ -955,6 +955,9 @@
             if (Double.isNaN(d) || Double.isInfinite(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);