www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brett Porter (JIRA)" <j...@apache.org>
Subject [jira] Commented: (INFRA-3476) Disable the DesignForExtension Check for MyFaces and OpenWebBeans
Date Thu, 03 Mar 2011 16:47:42 GMT

    [ https://issues.apache.org/jira/browse/INFRA-3476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002058#comment-13002058
] 

Brett Porter commented on INFRA-3476:
-------------------------------------

sorry, the credentials I remember using aren't working - I don't have access to my keychain
here unfortunately.

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

        

Mime
View raw message