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 2006/06/20 21:59:13 UTC
svn commit: r415788 -
/xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/Token.java
Author: mrglavas
Date: Tue Jun 20 12:59:13 2006
New Revision: 415788
URL: http://svn.apache.org/viewvc?rev=415788&view=rev
Log:
Fixing JIRA Bug #1126:
http://issues.apache.org/jira/browse/XERCESJ-1126
In non-XML schema the wrong first character optimization was being used
for regular expressions starting with '.'. This is fixed thanks to the
patch from Kent Tamura.
Modified:
xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/Token.java
Modified: xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/Token.java
URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/Token.java?rev=415788&r1=415787&r2=415788&view=diff
==============================================================================
--- xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/Token.java (original)
+++ xerces/java/trunk/src/org/apache/xerces/impl/xpath/regex/Token.java Tue Jun 20 12:59:13 2006
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2002,2004,2005 The Apache Software Foundation.
+ * Copyright 1999-2002,2004-2006 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -437,20 +437,8 @@
}
return FC_TERMINAL;
- case DOT: // ****
- if (isSet(options, RegularExpression.SINGLE_LINE)) {
- return FC_CONTINUE; // **** We can not optimize.
- } else {
- return FC_CONTINUE;
- /*
- result.addRange(0, RegularExpression.LINE_FEED-1);
- result.addRange(RegularExpression.LINE_FEED+1, RegularExpression.CARRIAGE_RETURN-1);
- result.addRange(RegularExpression.CARRIAGE_RETURN+1,
- RegularExpression.LINE_SEPARATOR-1);
- result.addRange(RegularExpression.PARAGRAPH_SEPARATOR+1, UTF16_MAX);
- return 1;
- */
- }
+ case DOT:
+ return FC_ANY;
case RANGE:
if (isSet(options, RegularExpression.IGNORE_CASE)) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org