You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Piroumian Konstantin <KP...@protek.com> on 2002/07/11 17:57:47 UTC
Java Coding styles
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
Re: Java Coding styles
Posted by Nicola Ken Barozzi <ni...@apache.org>.
Piroumian Konstantin wrote:
>
> We are lacking some guidelines for Java source code format.
...
> What do you think?
http://jakarta.apache.org/poi/resolutions/res001.html
And that's all I have to say about this.
--
Nicola Ken Barozzi nicolaken@apache.org
- verba volant, scripta manent -
(discussions get forgotten, just code remains)
---------------------------------------------------------------------