ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Kaputin (JIRA)" <>
Subject [jira] Updated: (WSCOMMONS-120) XmlSchema.equals(Object) returns a false positive result
Date Thu, 02 Nov 2006 12:11:20 GMT
     [ ]

John Kaputin updated WSCOMMONS-120:

    Attachment: XmlSchema_equals_patch.txt

Implements the equals(Object) method for XmlSchema.

> XmlSchema.equals(Object) returns a false positive result
> --------------------------------------------------------
>                 Key: WSCOMMONS-120
>                 URL:
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: XmlSchema
>            Reporter: John Kaputin
>         Attachments: XmlSchema_equals_patch.txt
> 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.
> [1]
> 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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message