[prev in list] [next in list] [prev in thread] [next in thread] 

List:       woden-dev
Subject:    [jira] [Commented] (WSCOMMONS-120) XmlSchema.equals(Object) returns a false positive result
From:       "Hudson (JIRA)" <jira () apache ! org>
Date:       2015-07-18 17:12:04
Message-ID: JIRA.12354556.1162469392000.227453.1437239524908 () Atlassian ! JIRA
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/WSCOMMONS-120?page=com.atlassian.jira.plug \
in.system.issuetabpanels:comment-tabpanel&focusedCommentId=14632527#comment-14632527 \
] 

Hudson commented on WSCOMMONS-120:
----------------------------------

SUCCESS: Integrated in woden-trunk #1211 (See \
[https://builds.apache.org/job/woden-trunk/1211/]) Fix a regression for \
                WODEN-13/WSCOMMONS-120. (veithen: rev 1691753)
* /webservices/woden/trunk/java/woden-core/src/main/java/org/apache/woden/internal/wsdl20/ComponentModelBuilder.java
                
* /webservices/woden/trunk/java/woden-core/src/test/java/org/apache/woden/MultiSchemaTest.java



> XmlSchema.equals(Object) returns a false positive result
> --------------------------------------------------------
> 
> Key: WSCOMMONS-120
> URL: https://issues.apache.org/jira/browse/WSCOMMONS-120
> Project: WS-Commons
> Issue Type: Bug
> Components: XmlSchema
> Reporter: John Kaputin
> Assignee: Davanum Srinivas
> 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 was sent by Atlassian JIRA
(v6.3.4#6332)

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic