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

List:       xmlbeans-dev
Subject:    [jira] Commented: (XMLBEANS-347) XmlComplexContentImpl.equal_to()
From:       "Jacob Danner (JIRA)" <xmlbeans-dev () xml ! apache ! org>
Date:       2007-11-08 5:48:50
Message-ID: 16942681.1194500930942.JavaMail.jira () brutus
[Download RAW message or body]


    [ https://issues.apache.org/jira/browse/XMLBEANS-347?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540981 \
] 

Jacob Danner commented on XMLBEANS-347:
---------------------------------------

the method is used internally in three places, and one such usage has a method that \
                explicitly does not allow exceptions (compareTo)
     * (2) it is allowed to return 2 for "incomparable";
     *     it should not throw an exception.

org.apache.xmlbeans.impl.values
[XmlObjectBase[compare_to(XmlObject)[(2318, 13)
 |if| |(|equal_to|(|xmlobj|)|)], 

valueEqualsImpl(XmlObject)[(2137, 41) 
> return| |(|underlying|(|xmlobj|)|)|.|equal_to|(|this|)|;, 
(2139, 16) |return| |equal_to|(|xmlobj|)|;]]]
XmlObjectBase[compare_to(XmlObject)[(2318, 13) 
> if| |(|equal_to|(|xmlobj|)|)], valueEqualsImpl(XmlObject)[(2137, 41) 
> return| |(|underlying|(|xmlobj|)|)|.|equal_to|(|this|)|;, (2139, 16) |return| \
> |equal_to|(|xmlobj|)|;]]

compare_to(XmlObject)[(2318, 13) |if| |(|equal_to|(|xmlobj|)|)]
(2318, 13) |if| |(|equal_to|(|xmlobj|)|)
valueEqualsImpl(XmlObject)[(2137, 41) |return| \
|(|underlying|(|xmlobj|)|)|.|equal_to|(|this|)|;, (2139, 16) |return| \
|equal_to|(|xmlobj|)|;] (2137, 41) |return| \
|(|underlying|(|xmlobj|)|)|.|equal_to|(|this|)|; (2139, 16) |return| \
|equal_to|(|xmlobj|)|;

> XmlComplexContentImpl.equal_to() fails to throw exception when unable to return \
>                 correct value
> ---------------------------------------------------------------------------------------------
>  
> Key: XMLBEANS-347
> URL: https://issues.apache.org/jira/browse/XMLBEANS-347
> Project: XMLBeans
> Issue Type: Bug
> Affects Versions:  Version 2.3
> Environment: n/a
> Reporter: Charles Butterfield
> Assignee: Jacob Danner
> Priority: Critical
> 
> I was recently horrified to discover that valueEquals() fails silently for complex \
> types.  For complex types the comparison is delegated to \
> XmlComplexContentImpl.equal_to() which simply returns "true" with the comment \
> "BUGBUG: by-value structure comparison undone". Clearly the method should throw an \
> exception to alert users to the issue, as do various neighboring methods. I first \
> ran into this problem (today) while using an old xbean.jar  (built in early 2004).  \
> I then checked the 2.3.0 source and the bug still exists.  So its been there \
> unchanged since version 1.0.4 at least. Hopefully adding the exception is a \
> no-brainer.  Perhaps a working implementation could follow.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


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

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