Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-5571

Policy Alternative compatibility checking rely on not overriden equals() method

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-milestone1, 2.7.10
    • Fix Version/s: 3.0.0-milestone2, 2.7.11
    • Component/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Use case: SOAP service uses policy containing more than one alternative.
      To build outgoing interceptor chain, single alternative in effective policy is selected using AlternativeSelector. One of the selection steps is check BaseAlternativeSelector.isCompatibleWithRequest()

      Problem:
      Method BaseAlternativeSelector.isCompatible doesn't work as designed,
      because Neethi PolicyContainingPrimitiveAssertion and PrimitiveAssertion do not override equals() method. As a result alternative is never removed from the list r2 if assertions are different objects:
      protected boolean isCompatible(List<Assertion> alternative, List<Assertion> r) {
      List<Assertion> r2 = new ArrayList<Assertion>(r);
      for (Assertion a : alternative)

      { r2.remove(a); }

      return r2.isEmpty();
      }

      Proposal: clean solution will be to fix that in Neethi and provide equals method. Quick fix will be check of assertion QName.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                ashakirin Andrei Shakirin
                Reporter:
                ashakirin Andrei Shakirin
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: