Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#84 RedundantImport shall complain about static var in interface

release_3.0
closed
nobody
None
5
2012-10-10
2003-02-05
Christian Hujer
No

Variables in interfaces are always public static final.
From the JLS, 9.3 Field (Constant) Declarations
http://java.sun.com/docs/books/jls/second_edition/html/interfaces.doc.html
:
Every field declaration in the body of an interface is
implicitly public, static, and final.

So these three modifiers, public, static and final, are
redundant in interfaces.

When the module RedundantModifier is used, checkstyle
complains about public and final but not about static.

I think, checkstyle should also complain about static.

Thanks

/Christian

Discussion

  • Logged In: YES
    user_id=465603

    I just took a look at checkstyle's source in head revision.
    I saw it's already fixed there.
    So I closed this.