• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?xml version="1.0"?>
2<!--
3   Licensed to the Apache Software Foundation (ASF) under one or more
4   contributor license agreements.  See the NOTICE file distributed with
5   this work for additional information regarding copyright ownership.
6   The ASF licenses this file to You under the Apache License, Version 2.0
7   (the "License"); you may not use this file except in compliance with
8   the License.  You may obtain a copy of the License at
9
10       http://www.apache.org/licenses/LICENSE-2.0
11
12   Unless required by applicable law or agreed to in writing, software
13   distributed under the License is distributed on an "AS IS" BASIS,
14   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   See the License for the specific language governing permissions and
16   limitations under the License.
17-->
18<document>
19   <properties>
20      <title>Conventions</title>
21   </properties>
22
23   <body>
24      <section name="Code Style">
25            <p>
26            The developers of this component decided to follow the recommended standards
27            but not to include Checkstyle (or similar tools) into Commons Compress.
28            </p>
29      </section>
30      <section name="Multithreading">
31            <p>
32            Commons Compress does not aim to be threadsafe at the moment. But the developers
33            agreed to document multithreading behaviour in the javadocs.
34            </p>
35            <p>
36            We use some of the annotations from
37            <a href="http://jcip.net/annotations/doc/net/jcip/annotations/package-summary.html">JCIP</a>
38            as Javadoc tags. The used tags are:
39
40            <ul>
41                <li>@GuardedBy (field or method)</li>
42                <li>@Immutable (class)</li>
43                <li>@NotThreadSafe (class)</li>
44                <li>@ThreadSafe (class)</li>
45            </ul>
46
47            For example:
48            <source>
49/**
50 * Utility class that represents a four byte integer with conversion
51 * rules for the big endian byte order of ZIP files.
52 *
53 * @Immutable
54 */
55public final class ZipLong implements Cloneable {
56            </source>
57
58            and:
59
60            <source>
61private final char [] highChars;
62//@GuardedBy("this")
63private Simple8BitZipEncoding encoding;
64            </source>
65            </p>
66      </section>
67
68   </body>
69</document>
70