ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Kaputin (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WSCOMMONS-120) XmlSchema.equals(Object) returns a false positive result
Date Thu, 02 Nov 2006 12:11:20 GMT
     [ http://issues.apache.org/jira/browse/WSCOMMONS-120?page=all ]

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: http://issues.apache.org/jira/browse/WSCOMMONS-120
>             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] http://dev.w3.org/cvsweb/~checkout~/2002/ws/desc/test-suite/documents/good/Chameleon-4G/getBalance.wsdl
> 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: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org


Mime
View raw message