[jira] [Created] (CHAIN-81) FacesWebContext.FacesWebContext(FacesContext context) ctor calls overridable method

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (CHAIN-81) FacesWebContext.FacesWebContext(FacesContext context) ctor calls overridable method

AD_LB (Jira)
Sebb created CHAIN-81:
-------------------------

             Summary:  FacesWebContext.FacesWebContext(FacesContext context) ctor calls overridable method
                 Key: CHAIN-81
                 URL: https://issues.apache.org/jira/browse/CHAIN-81
             Project: Commons Chain
          Issue Type: Bug
    Affects Versions: 2.0
            Reporter: Sebb


Ctors should never call overrideable methods.

In this case, the called method only sets the context, so the code could be copied.

If it's essential to give overridable access to a method called by a ctor, create a private method to do the work and call it from ctor and the exported method.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira