morten 01/09/25 13:42:31
Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
Log:
Changed BasisLibrary.formatNumer() (this is the implementation of
format-number()) so that it correctly formats NaNs into "NaN".
PR: bugzilla 2890
Obtained from: n/a
Submitted by: [EMAIL PROTECTED]
Reviewed by: [EMAIL PROTECTED]
Revision Changes Path
1.19 +2 -1
xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java
Index: BasisLibrary.java
===================================================================
RCS file:
/home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- BasisLibrary.java 2001/09/25 19:53:43 1.18
+++ BasisLibrary.java 2001/09/25 20:42:31 1.19
@@ -1,5 +1,5 @@
/*
- * @(#)$Id: BasisLibrary.java,v 1.18 2001/09/25 19:53:43 morten Exp $
+ * @(#)$Id: BasisLibrary.java,v 1.19 2001/09/25 20:42:31 morten Exp $
*
* The Apache Software License, Version 1.1
*
@@ -838,6 +838,7 @@
public static String formatNumber(double number, String pattern,
DecimalFormat formatter) {
try {
+ if (Double.isNaN(number)) return("NaN");
StringBuffer result = new StringBuffer();
formatter.applyLocalizedPattern(pattern);
formatter.format(number,result,_fieldPosition);
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]