| <?xml version="1.0" encoding="ISO-8859-1"?> |
| <!--
|
| Licensed to the Apache Software Foundation (ASF) under one
|
| or more contributor license agreements. See the NOTICE file
|
| distributed with this work for additional information
|
| regarding copyright ownership. The ASF licenses this file
|
| to you under the Apache License, Version 2.0 (the
|
| "License"); you may not use this file except in compliance
|
| with the License. You may obtain a copy of the License at
|
|
|
| http://www.apache.org/licenses/LICENSE-2.0
|
|
|
| Unless required by applicable law or agreed to in writing,
|
| software distributed under the License is distributed on an
|
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
| KIND, either express or implied. See the License for the
|
| specific language governing permissions and limitations
|
| under the License.
|
| -->
|
| <document> |
| <properties> |
| <title>Overview</title> |
| <author email="server-dev@james.apache.org">James jSPF Project Team</author> |
| </properties> |
| <body> |
| <section name="Coding Standards"> |
| <p> |
| 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 |
| <a href="http://java.sun.com/docs/codeconv/html/CodeConvTOC.doc.html">Sun |
| Java Coding Conventions</a>. |
| </p> |
| |
| <p> |
| <strong>Developers who commit code that does not follow |
| the coding conventions outlined in this document will be |
| responsible for fixing their own code.</strong> |
| </p> |
| |
| <p> |
| 1. Spaces between parentheses are optional. The preference is to exclude |
| extra spaces. Both of these conventions are acceptable: |
| </p> |
| |
| <p> |
| <source> |
| |
| if (foo) |
| |
| or |
| |
| if ( foo ) |
| </source> |
| </p> |
| |
| <p> |
| 2. Four spaces. <strong>NO tabs</strong>. Period. The James |
| mailing list receives cvs commit messages that are almost impossible |
| to read if tabs are used. |
| </p> |
| |
| <p> |
| In Emacs-speak, this translates to the following command: |
| |
| (setq-default tab-width 4 indent-tabs-mode nil) |
| </p> |
| |
| <p> |
| 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. |
| </p> |
| |
| <p> |
| 4. Javadoc <strong>must</strong> 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. |
| </p> |
| |
| <p> |
| 5. The Jakarta Apache/James License <strong>MUST</strong> be placed |
| at the top of every file. |
| </p> |
| </section> |
| </body> |
| </document> |