The Jakarta Project James - Java Apache Mail Enterprise Server

James

Translated

Downloads

Current Documentation

Older Documentation

Project

Jakarta Information (web)

Related Projects (web)

Coding Standards

Submissions to the James project must follow the coding conventions outlined in this document. James developers are asked to follow coding conventions already present in the code. (For example, if the existing code has the bracket on the same line as the if statement, then all subsequent code should also follow that convention.) Anything not explicitly mentioned in this document should adhere to the official Sun Java Coding Conventions.

Developers who commit code that does not follow the coding conventions outlined in this document will be responsible for fixing their own code.

1. Spaces between parentheses are optional. The preference is to exclude extra spaces. Both of these conventions are acceptable:


if (foo)

or

if ( foo )

2. Four spaces. NO tabs. Period. The James mailing list receives cvs commit messages that are almost impossible to read if tabs are used.

In Emacs-speak, this translates to the following command: (setq-default tab-width 4 indent-tabs-mode nil)

3. Use Unix linefeeds for all .java source code files. Only platform-specific files (e.g. .bat files for Windows) should contain non-Unix linefeeds.

4. Javadoc must exist on all methods. Contributing a missing javadoc for any method, class, variable, etc., will be GREATLY appreciated as this will help to improve the James project.

5. The Jakarta Apache/James License MUST be placed at the top of every file.


Copyright © 1999-2002, Apache Software Foundation