You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by zo...@apache.org on 2003/09/19 02:50:20 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java
zongaro 2003/09/18 17:50:20
Modified: java/src/org/apache/xpath/compiler XPathParser.java
Log:
Applying patch from Joanne Tong (joannet@ca.ibm.com) for Bugzilla bug report
23200. The XPath syntax for a number is "Digits ('.' Digits?)? | '.' Digits".
The XPath parser accepted anything accepted by the Java double literal syntax,
including values using "E" exponential notation. The fix was to guard against
any value using exponential notation.
Revision Changes Path
1.26 +3 -0 xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java
Index: XPathParser.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/compiler/XPathParser.java,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- XPathParser.java 30 Jan 2003 18:46:25 -0000 1.25
+++ XPathParser.java 19 Sep 2003 00:50:20 -0000 1.26
@@ -2054,6 +2054,9 @@
try
{
+ // XPath 1.0 does not support number in exp notation
+ if ((m_token.indexOf('e') > -1)||(m_token.indexOf('E') > -1))
+ throw new NumberFormatException();
num = Double.valueOf(m_token).doubleValue();
}
catch (NumberFormatException nfe)
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org