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

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

Manuel Siggen created CXF-7533:
----------------------------------

             Summary: 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


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)