commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SANDBOX-300) Threading Requirements
Date Fri, 13 Mar 2009 19:52:51 GMT

    [ https://issues.apache.org/jira/browse/SANDBOX-300?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12681876#action_12681876
] 

Sebb commented on SANDBOX-300:
------------------------------

Documenting thread-safety:

There are some useful annotations in JCIP (http://jcip.net/annotations/doc/net/jcip/annotations/package-summary.html).:

@GuardedBy (field or method)
@Immutable (class)
@NotThreadSafe (class)
@ThreadSafe (class)

Although Compress does not currently target Java 1.5, one could still add the annotations
as comments.
These could be uncommented later, and used in tools such as Findbugs (when the checks are
implemented).

So for example, one could have:

{code}
/**
 * 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 {
{code}

and

{code}
private final char [] highChars;
//@GuardedBy("this")
private Simple8BitZipEncoding encoding;
{code}


> Threading Requirements
> ----------------------
>
>                 Key: SANDBOX-300
>                 URL: https://issues.apache.org/jira/browse/SANDBOX-300
>             Project: Commons Sandbox
>          Issue Type: Improvement
>          Components: Compress
>            Reporter: Christian Grobmeier
>
> The compress source has not got any docs about threading behaviour.
> The following must be discussed before a release 1:
> * decide/document thread-safety requirements.
> * fix classes that violate them
> * possibly relax requirements if some classes are difficult/expensive to fix.
> Additionally javadoc must be updated with the decisions/behaviour.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message