RFR (JAXP): 8035577: Xerces Update: impl/xpath/regex/RangeToken.java

huizhe wang huizhe.wang at oracle.com
Fri Mar 14 17:01:16 UTC 2014


On 3/14/2014 7:38 AM, Alan Bateman wrote:
> On 13/03/2014 23:07, David Li wrote:
>> Hi,
>>
>> This is an update from Xerces for file 
>> impl/xpath/regex/TokenRange.java.  For details, please refer to: 
>> https://bugs.openjdk.java.net/browse/JDK-8035577.
>>
>> Webrevs: http://cr.openjdk.java.net/~joehw/jdk9/8035577/webrev/
>>
>> New test case was added for code change in 
>> RangeToken.intersectRanges.  Other minor issues from last review 
>> comments are updated.
>>
>> Existing tests: JAXP SQE and unit tests passed.
> A bit of side question but this regex code seems very old (Hashtable, 
> Vector ...) and I'm wondering how feasible it would be to replace it 
> completely with java.util.regex. Joe might know if this has ever been 
> discussed upstream (and I appreciate there is a desire to keep the 
> code the same where possible).

We are open to newer features. Xerces still support JDK 1.4, but we have 
moved on and accepted JDK 7 features. We will update and replace the old 
code such as Hashtable, Vector along the way and where possible. Note 
that, I mentioned to the corelib before, that Xalan has a strip-down 
version of Hashtable that actually performs better than Hashmap.

As for the Xerces-flavor of regex, it's a XML Schema conformant 
implementation. It supports that defined in the XML Schema 
specification: 
http://www.w3.org/TR/2000/WD-xmlschema-2-20000407/#regexs. It may be 
possible to replace with java.util.regex but not without some sort of 
pattern-translation mechanism.

-Joe

>
> -Alan




More information about the core-libs-dev mailing list