commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Commons Wiki] Update of "CodeStyle" by sebbapache
Date Mon, 18 Mar 2013 11:23:27 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Commons Wiki" for change notification.

The "CodeStyle" page has been changed by sebbapache:

More rules

  ||JavaDoc: @author Tag should not be used || info ||
  ||JavaDoc: @deprecated Tag must include version where first deprecated, and a link to the
replacement (if any) || warning ||
  ||JavaDoc: @since Tag must be used to document new classes and methods where these form
part of the public API || warning||
+ ||Object visibility should be the minimum required (See notes)||warning ||
+ ||Prefer immutable classes as these are automatically thread-safe ||info ||
+ ||Mutable fields must be private (See notes)||error ||
+ ||Mutable fields should not be exposed via getters/setters (See notes)||warning ||
  ||Add your rule here ||warning ||
   1. POMs tend to have quite deeply nested elements, and many elements can be long and awkward
to wrap, so using 2 spaces is sometimes easier to read.
   1. The SVN $Date$ keyword should not be used, because it relies on the clients locale.
Use the $Id$ keyword instead (see
   1. Document authors in POM, not in source files (see
+  1. Object visibility: once code is released, it can be impossible to reduce the visibility
of fields, classes, methods without breaking compatibility, so initial releases should use
the minimum visibility possible.
+  1. Mutable data: this increases the difficulty of ensuring thread-safety (including safe
publication of changes). Data should be confined to a class; mutation should only be allowed
via a setter which can ensure thread-safety. Be careful that the getter does not expose array
contents (which are always mutable)

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message