You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2007/11/15 05:56:41 UTC

svn commit: r595205 - /xerces/java/trunk/src/org/apache/xerces/impl/xpath/XPath.java

Author: mrglavas
Date: Wed Nov 14 20:56:40 2007
New Revision: 595205

URL: http://svn.apache.org/viewvc?rev=595205&view=rev
Log:
Fixing JIRA Bug #1280:
http://issues.apache.org/jira/browse/XERCESJ-1280

In the XPath scanner there's a large case block which is missing a "default:". This caused
it to loop forever on the same invalid character without ever progressing to the next one 
in the string (or breaking out of the loop if it's at the end of the string). Should be
fixed now.

Modified:
    xerces/java/trunk/src/org/apache/xerces/impl/xpath/XPath.java

Modified: xerces/java/trunk/src/org/apache/xerces/impl/xpath/XPath.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xpath/XPath.java?rev=595205&r1=595204&r2=595205&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xpath/XPath.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xpath/XPath.java Wed Nov 14 20:56:40 2007
@@ -1881,6 +1881,10 @@
                         tokens.addToken(nameHandle);
                     }
                     break;
+                default:
+                    // CHARTYPE_INVALID or CHARTYPE_OTHER
+                    // We're not expecting to find either of these in a valid expression.
+                    return false;
                 }
             }
             if (XPath.Tokens.DUMP_TOKENS) {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org