PolicyUtil.matchByQName defect when lists are the same size
-----------------------------------------------------------

         Key: WSCOMMONS-45
         URL: http://issues.apache.org/jira/browse/WSCOMMONS-45
     Project: WS-Commons
        Type: Bug

  Components: Policy  
    Reporter: David Waite


The following lines:

                List larger = (primTermsA.size() > primTermsB.size()) ? 
primTermsA
                                : primTermsB;
                List smaller = (primTermsA.size() < primTermsB.size()) ? 
primTermsA
                                : primTermsB;

Will cause larger and smaller to both be set to primTermsB when the lists are 
of the same size. This can be solved by changing one of the comparisons to 
either >= or <=, or (perhaps more ideally for readability) making the 
statements in an if block.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to