www-infrastructure-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <j...@apache.org>
Subject [jira] Created: (INFRA-3476) Disable the DesignForExtension Check for MyFaces and OpenWebBeans
Date Thu, 24 Feb 2011 09:36:38 GMT
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

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

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


View raw message