mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-20 19:14:38 +02:00
8015978: Incorrect transformation of XPath expression "string(-0)"
Reviewed-by: darcy, joehw
This commit is contained in:
parent
b914f8d6be
commit
e6d0dba36c
1 changed files with 4 additions and 1 deletions
|
@ -952,9 +952,12 @@ public final class BasisLibrary {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (Double.isNaN(d) || Double.isInfinite(d))
|
if (!Double.isFinite(d))
|
||||||
return(Double.toString(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
|
// Use the XPath formatter to ignore locales
|
||||||
StringBuffer result = threadLocalStringBuffer.get();
|
StringBuffer result = threadLocalStringBuffer.get();
|
||||||
result.setLength(0);
|
result.setLength(0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue