You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Andrei Shakirin (JIRA)" <ji...@apache.org> on 2014/02/20 09:24:19 UTC

[jira] [Assigned] (CXF-5571) Policy Alternative compatibility checking rely on not overriden equals() method

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

Andrei Shakirin reassigned CXF-5571:
------------------------------------

    Assignee: Andrei Shakirin

> 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
>
> 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)