forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Piroumian Konstantin <KPiroum...@protek.com>
Subject Java Coding styles
Date Thu, 11 Jul 2002 15:57:47 GMT
Hi forresters!

We are lacking some guidelines for Java source code format. From the source
in CVS I see that it uses 2 space indentation and different brace styles
(opening brace on the same line or on a new line). Also, using  @author
$Author: stevenn $ is not a very good idea, cause the author can differ from
the committer.

I'd suggest to stuck to single coding convensions, say, to Sun's standart,
which is used in Cocoon too. And at least:
	- 4 space indentation
	- curly brace is always on the same line
	- no spaces between opening/closing brace and arguments (e.g.:
hello(value);)
	- JavaDocs formatted according to Sun's format, e.g.:
		wrong: 
			/** Description 
			 *
			 */
		right: 
			/**
			 * Description 
			 */
	etc.

For the author field I'd suggest to follow Cocoon's format: @author <a
href="mailto:steven@apache.org">Steven Noels</a>. This way it's easy to
reach the author and ask him why he has wrote those lines in code ;)

We can have some document like the ones on Avalon or Cocoon about the
subject.

What do you think? 

Regards,
  Konstantin






Mime
View raw message