Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The XmlSchema class inherits the equals(Object) method from XmlSchemaObject.
This method uses line number, line position and sourceURI for equality
checking, however line number and position are always zero (they are not
used yet?). This can cause a false positive when checking equality of two
different schemas that share the same source URI.
For example, the WSDL 2.0 testcase at [1] has two inlined schemas. For
XmlSchema1.equals(XmlSchema2), both XmlSchema objects will have line number
zero, line position zero and the WSDL URI as their sourceURI and
XmlSchemaObject.equals will return true, even though in this case the two
inlined schemas have different target namespaces and xs:include different
schema documents.
I think a solution is to create an equals method on XmlSchema which invokes
super.equals (i.e. from XmlSchemaObject) and adds further equality checking
specific to XmlSchema. I have tried the attached patch which fixes my
testcase, although it may require more equality checking logic in the equals method
to be more useful generally.
Attachments
Attachments
Issue Links
- blocks
-
WODEN-13 Test Case Failures: documents/good/Chameleon-1G, 2G, 3G, 4G
- Closed