You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2019/05/17 01:49:00 UTC

[jira] [Updated] (GROOVY-9122) code smell in ProcessingUnit

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

Paul King updated GROOVY-9122:
------------------------------
    Description: 
We have both {{configure}} and {{setConfigurarion}} which by default do the same thing. The constructor only uses the former. It isn't clear which should be overridden if wanting to extend the class using normal OO conventions. We can make the {{setConfiguration}} method final to capture the intent of current usage.

The change is a breaking change if code was overriding {{setConfiguration}} but in that case it was probably broken to start with.

  was:
We have both {{configure}} and {{setConfigure}} which by default do the same thing. The constructor only uses the former. It isn't clear which should be overridden if wanting to extend the class using normal OO conventions. We can make the {{setConfigure}} method final to capture the intent of current usage.

The change is a breaking change if code was overriding {{setConfigure}} but in that case it was probably broken to start with.


> code smell in ProcessingUnit
> ----------------------------
>
>                 Key: GROOVY-9122
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9122
>             Project: Groovy
>          Issue Type: Improvement
>    Affects Versions: 3.0.0-beta-1, 2.5.7
>            Reporter: Paul King
>            Priority: Major
>              Labels: breaking
>
> We have both {{configure}} and {{setConfigurarion}} which by default do the same thing. The constructor only uses the former. It isn't clear which should be overridden if wanting to extend the class using normal OO conventions. We can make the {{setConfiguration}} method final to capture the intent of current usage.
> The change is a breaking change if code was overriding {{setConfiguration}} but in that case it was probably broken to start with.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)