You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2017/10/19 12:02:00 UTC

[jira] [Resolved] (CXF-7533) Setter setBus in AbstractConfigurableProvider does nothing

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

Sergey Beryozkin resolved CXF-7533.
-----------------------------------
       Resolution: Fixed
         Assignee: Sergey Beryozkin
    Fix Version/s: 3.2.1
                   3.1.14

thanks for the patch

> Setter setBus in AbstractConfigurableProvider does nothing
> ----------------------------------------------------------
>
>                 Key: CXF-7533
>                 URL: https://issues.apache.org/jira/browse/CXF-7533
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 3.1.9
>            Reporter: Manuel Siggen
>            Assignee: Sergey Beryozkin
>             Fix For: 3.1.14, 3.2.1
>
>
> Class [_AbstractConfigurableProvider_|https://github.com/apache/cxf/blob/master/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/provider/AbstractConfigurableProvider.java] defines the _setBus_ setter like that :
> {code}
>     private Bus bus;
>     
>     /**
>      * Sets the Bus
>      * @param b
>      */
>     public void setBus(Bus b) {
>         if (bus != null) {
>             bus = b;
>         }
>     }
> {code}
> The _bus_ field is initialized to _null_ and is only modified in the setter above : the _bus != null_ expression is always false and the _bus_ cannot be set at all.
> I guess, the code should read :
> {code}
>     public void setBus(Bus b) {
>         if (b != null) {
>             bus = b;
>         }
>     }
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)