Although in that link they do explicitly add a comment about the intentional side-effect. If it had been commented in the first place, you wouldn't have everyone looking at it now :)

Regards
Chris

Jacob Danner (JIRA) wrote:
[ https://issues.apache.org/jira/browse/XMLBEANS-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540984 ]
Jacob Danner commented on XMLBEANS-348:
---------------------------------------

Item #1 looks like a bug easily fixed
item #2 is actually one way they recommend to check a class' assertion status
http://java.sun.com/j2se/1.4.2/docs/guide/lang/assert.html#design-faq-enable-disable
question #7

2 Dubious assignments, probably should be equality tests
--------------------------------------------------------

                Key: XMLBEANS-348
                URL: https://issues.apache.org/jira/browse/XMLBEANS-348
            Project: XMLBeans
         Issue Type: Bug
   Affects Versions:  Version 2.3
        Environment: n/a
           Reporter: Charles Butterfield
           Assignee: Jacob Danner

While peeking at the source code to report bug XMLBEANS-347, I (or rather the 
compiler) ran across two dubious assignments that were probably meant to be 
equality tests as shown below:
1) org.apache.xmlbeans.impl.common.XPath: line 717:
                       if ((_lastDeepDot = deepDot))
NOTE: if this really is meant to be an assignment, then the following conditional 
"_lastDeepDot = true;" is clearly
redundant, which helped me conclude this is a bug, rather than an evil combined 
assignment and test.
2) org.apache.xmlbeans.impl.schema.SchemaTypeSystemImpl: line 756:
                              assert assertEnabled = true;
Hope you find this useful,
Regards
-- Charlie


--
Chris
HMGCC

The information contained in this message (and any attachments) may
be confidential and is intended for the sole use of the named addressee.
Access, copying, alteration or re-use of the e-mail by anyone other
than the intended recipient is unauthorised. If you are not the intended
recipient please advise the sender immediately by returning the e-mail
and deleting it from your system.

This information may be exempt from disclosure under Freedom Of Information Act 2000 and may be subject to exemption under other UK information legislation. Refer disclosure requests to the Information Officer.


The original of this email was scanned for viruses by the Government Secure 
Intranet Anti-Virus service supplied by Cable&Wireless in partnership with 
MessageLabs. (CCTM Certificate Number 2006/04/0007.) On leaving the GSi this email 
was certified virus free.
Communications via the GSi may be automatically logged, monitored and/or 
recorded for legal purposes.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to