You are viewing a plain text version of this content. The canonical link for it is here.
Posted to infrastructure-issues@apache.org by "Olivier Lamy (JIRA)" <ji...@apache.org> on 2011/03/11 23:50:59 UTC

[jira] Closed: (INFRA-3476) Disable the DesignForExtension Check for MyFaces and OpenWebBeans

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

Olivier Lamy closed INFRA-3476.
-------------------------------

    Resolution: Fixed
      Assignee: Olivier Lamy

done

> Disable the DesignForExtension Check for MyFaces and OpenWebBeans
> -----------------------------------------------------------------
>
>                 Key: INFRA-3476
>                 URL: https://issues.apache.org/jira/browse/INFRA-3476
>             Project: Infrastructure
>          Issue Type: Improvement
>      Security Level: public(Regular issues) 
>          Components: Analysis
>            Reporter: Mark Struberg
>            Assignee: Olivier Lamy
>
> Hi folks!
> Can you please disable the DesignForExtension Check in our Sonar installation?
> checkstyle    Key: com.puppycrawl.tools.checkstyle.checks.design.DesignForExtensionCheck
> http://www.docjar.org/docs/api/com/puppycrawl/tools/checkstyle/checks/design/DesignForExtensionCheck.html
> ** quote **
> Checks that classes are designed for inheritance.
> More specifically, it enforces a programming style where superclasses provide empty "hooks" that can be implemented by subclasses. 
> The exact rule is that nonprivate, nonstatic methods in nonfinal classes (or classes that do not only have private constructors) must either be
>     * abstract or
>     * final or
>     * have an empty implementation
> ** endquote **
> I tried to disable this check in our own checkstyle configuration, but that didn't help.
> I generally don't really see how such rules can enforced generally, because this trick only helps if there is exactly 1 subclass in the hierarchy. But once you subclass the subclass, you are lost again. If you like a default behaviour then you'd need to duplicate most classes which unnecessarily blows up the source code big times - which is imo much worse.
> Also this doesn't work with lots of projects where subclasses will get generated dynamically either at compiletime like e.g. in OpenJPA or at runtime like in all CDI projects because final classes and methods cannot get proxied nor subclassed.
> Please disable it at least for the following projects:
> * OpenWebBeans
> * MyFaces * (currently only CODI)
> txs and LieGrue,
> strub

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira