[cdi-dev] [JBoss JIRA] (CDI-192) Unify coding style of the SPI interfaces

Jozef Hartinger (Created) (JIRA) jira-events at lists.jboss.org
Fri Nov 18 10:53:42 EST 2011


Unify coding style of the SPI interfaces
----------------------------------------

                 Key: CDI-192
                 URL: https://issues.jboss.org/browse/CDI-192
             Project: CDI Specification Issues
          Issue Type: Bug
          Components: Portable Extensions
    Affects Versions: 1.1.EDR1
            Reporter: Jozef Hartinger
            Priority: Trivial
             Fix For: 1.1 (Proposed)


The [JLS|http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.4] says:

{quote}
For compatibility with older versions of the Java platform, it is permitted but discouraged, as a matter of style, to redundantly specify the abstract modifier for methods declared in interfaces.

It is permitted, but strongly discouraged as a matter of style, to redundantly specify the public modifier for interface methods.
{quote}

The vast majority of CDI API interfaces specifies the public modifier while leaving out the abstract modifier, however, there are exceptions:

{code:JAVA}
public interface Context {
...
    boolean isActive();
}
{code}

{code:JAVA}
public interface BeanAttributes<T> {
    public abstract Set<Type> getTypes();
    public abstract Set<Annotation> getQualifiers();
...
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the cdi-dev mailing list