You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by ga...@apache.org on 2001/05/11 00:54:22 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java
garyp 01/05/10 15:54:22
Modified: java/src/org/apache/xpath/functions FuncExtFunction.java
Log:
Change submitted by Patrick Moore <pa...@ieee.org> as part of bugzilla 1373 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1373).
Return value from extension function is now generalized so that all derivatives of Number are now properly handled.
Revision Changes Path
1.9 +2 -10 xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunction.java
Index: FuncExtFunction.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncExtFunction.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- FuncExtFunction.java 2001/04/29 08:00:28 1.8
+++ FuncExtFunction.java 2001/05/10 22:54:20 1.9
@@ -164,17 +164,9 @@
result = ((Boolean) val).booleanValue()
? XBoolean.S_TRUE : XBoolean.S_FALSE;
}
- else if (val instanceof Double)
+ else if (val instanceof Number)
{
- result = new XNumber(((Double) val).doubleValue());
- }
- else if (val instanceof Long)
- {
- result = new XNumber(((Long)val).doubleValue());
- }
- else if (val instanceof Integer)
- {
- result = new XNumber(((Integer)val).doubleValue());
+ result = new XNumber(((Number) val).doubleValue());
}
else if (val instanceof DocumentFragment)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org