Apache Commons logo Commons Compress

Code Style

The developers of this component decided to follow the recommended standards but not to include Checkstyle (or similar tools) into Commons Compress.

Multithreading

Commons Compress does not aim to be threadsafe at the moment. But the developers agreed to document multithreading behavior in the javadocs.

We use some of the annotations from JCIP as Javadoc tags. The used tags are:

  • @GuardedBy (field or method)
  • @Immutable (class)
  • @NotThreadSafe (class)
  • @ThreadSafe (class)
For example:
/**
 * Utility class that represents a four byte integer with conversion
 * rules for the big endian byte order of ZIP files.
 *
 * @Immutable
 */
public final class ZipLong implements Cloneable {
            
and:
 
private final char [] highChars;
//@GuardedBy("this")
private Simple8BitZipEncoding encoding;