[ 
https://issues.apache.org/jira/browse/CXF-5571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrei Shakirin resolved CXF-5571.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.7.11
                   3.0.0-milestone2

> Policy Alternative compatibility checking rely on not overriden equals() 
> method
> -------------------------------------------------------------------------------
>
>                 Key: CXF-5571
>                 URL: https://issues.apache.org/jira/browse/CXF-5571
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.0.0-milestone1, 2.7.10
>            Reporter: Andrei Shakirin
>            Assignee: Andrei Shakirin
>             Fix For: 3.0.0-milestone2, 2.7.11
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to