JDK-8306807 : Schema error "cvc-complex-type.4" is reported twice on schema validation
  • Type: Bug
  • Component: xml
  • Sub-Component: jaxp
  • Affected Version: 8,11,13,15,17
  • Priority: P3
  • Status: New
  • Resolution: Unresolved
  • OS: generic
  • CPU: generic
  • Submitted: 2023-04-24
  • Updated: 2023-04-25
Related Reports
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
Since JDK 11.0.17 schema error "cvc-complex-type.4" is reported twice on schema validation when isSpecified == false and currDecl.fTargetNamespace == null (see src/java.xml/share/classes/com/sun/org/apache/xerces/internal/impl/xs/XMLSchemaValidator.java lines 3219++).

This behavior was introduced by commit https://github.com/openjdk/jdk11u-dev/commit/664f2abe79411e17bb7d2024fe2ba7fb9a7ab9ef to 11.0.17 GA (see https://github.com/openjdk/jdk11u-dev/commit/664f2abe79411e17bb7d2024fe2ba7fb9a7ab9ef#diff-559485fb84e5da2f5c0db2e967e6522895fb398da4d2eca9bd0f571461585b01).

When comparing this commit to the original change in the Xerces sources (see http://svn.apache.org/viewvc?view=revision&revision=1894472 or the according diff http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java?r1=1871903&r2=1894472&pathrev=1908724) it looks like a merge conflict.

REGRESSION : Last worked in version 11


FREQUENCY : always



Comments
The affected versions: 17.0.5 b01 15.0.9 b02 13.0.13 b02 11.0.17 b01 8u351 b01
25-04-2023