Uploaded image for project: 'WS-Commons'
  1. WS-Commons
  2. WSCOMMONS-45

PolicyUtil.matchByQName defect when lists are the same size

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Policy
    • None

    Description

      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.

      Attachments

        Activity

          People

            sanka Hettige Don Ignatious Nywan Sanka Samaranayake
            mass@akuma.org David Waite
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: