JDK-8298708 : Xerces 2.12.2 not updated correctly
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 8,11,17
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2022-12-13
  • Updated: 2022-12-24
  • Resolved: 2022-12-24
Related Reports
Duplicate :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
We noticed we are having an issue with the XMLSchemaValidator of xerces in the version 2.12.2, which got updated in the version 11.0.17.

After investigating, we noticed that the actual code in the jdk differs to the official repository of xerces (
https://svn.apache.org/repos/asf/xerces/java/). 
We found out that in the pull requests to update xerces to 2.12.2 (e.g. https://github.com/openjdk/jdk11u-dev/pull/1245/files) the XMLSchemaValidator was not updated correctly on line 3220-3235. Line 3219-3222 should not exist and leads now to the creation of 2 schemaErrors when using the jdk version of xerces.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Open https://svn.apache.org/repos/asf/xerces/java/tags/Xerces-J_2_12_2/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
2. Open https://github.com/openjdk-bots/jdk11u-dev/blob/5581111a6e7a70f8a23ad67763c4d952e40783cf/src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java
3. Compare line 3222 on each file 

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The jdk version of the XMLSchemaValidator should not differ from the original XMLSchemaValidator
ACTUAL -
The jdk version of the XMLSchemaValidator differs from the orignal.

FREQUENCY : always



Comments
Additional information from the submitter: I noticed that https://bugs.openjdk.org/browse/JDK-8298087 is the same bug I ran into. For some reason I couldn’t find it on bugs.java.com. However, I think it might be helpful for the developer of JDK-8298087, to look into my analysis. I’m sorry for the inconvenience.
16-12-2022

Requested a reproducer from the submitter.
15-12-2022

It would be nice if they could provide a test. Could you ask them for a test that reproduces the issues they noted? Thanks.
14-12-2022

It looks like https://github.com/openjdk-bots/jdk11u-dev/commit/5581111a6e7a70f8a23ad67763c4d952e40783cf#diff-559485fb84e5da2f5c0db2e967e6522895fb398da4d2eca9bd0f571461585b01 introduced the issue. It is related to JDK-8282280
14-12-2022