sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1553429 [1/2] - in /sis/branches/JDK7/core: sis-metadata/src/main/java/org/apache/sis/metadata/ sis-metadata/src/main/java/org/apache/sis/metadata/iso/ sis-referencing/src/main/java/org/apache/sis/geometry/ sis-referencing/src/main/java/or...
Date Thu, 26 Dec 2013 00:00:48 GMT
Author: desruisseaux
Date: Thu Dec 26 00:00:47 2013
New Revision: 1553429

URL: http://svn.apache.org/r1553429
Log:
Replaced the @Immutable annotation by javadoc, because the classes were immutable only under some conditions (SIS-156).

Removed:
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Immutable.java
Modified:
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
    sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
    sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/AngleConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ArrayConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CharSequenceConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/NumberConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Longitude.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/MeasurementRange.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/NumberRange.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Range.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/SexagesimalConverter.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/Version.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/AbstractName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultLocalName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultMemberName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultNameSpace.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultRecordType.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultScopedName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/DefaultTypeName.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/GlobalNameSpace.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/ResourceInternationalString.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/iso/SimpleInternationalString.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/resources/ResourceInternationalString.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/NilReason.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/OGCNamespacePrefixMapper.java
    sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/xml/OGCNamespacePrefixMapper_Endorsed.java

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/PropertyInformation.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -32,7 +32,6 @@ import org.apache.sis.internal.simple.Si
 import org.apache.sis.measure.ValueRange;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.Numbers;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.collection.CheckedContainer;
 import org.apache.sis.util.logging.Logging;
 
@@ -48,6 +47,9 @@ import org.apache.sis.util.logging.Loggi
  *        for the property. If the information had a <code>contains(E)</code> method, it would
  *        return <code>true</code> if the given value is valid for that property.}
  *
+ * {@section Immutability and thread safety}
+ * This final class is immutable and thus thread-safe.
+ *
  * @param <E> The value type, either the method return type if not a collection,
  *            or the type of elements in the collection otherwise.
  *
@@ -60,7 +62,6 @@ import org.apache.sis.util.logging.Loggi
  * @see MetadataStandard#asInformationMap(Class, KeyNamePolicy)
  * @see <a href="https://issues.apache.org/jira/browse/SIS-80">SIS-80</a>
  */
-@Immutable
 final class PropertyInformation<E> extends SimpleReferenceIdentifier
         implements ExtendedElementInformation, CheckedContainer<E>
 {

Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/ImmutableIdentifier.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -27,7 +27,6 @@ import org.opengis.parameter.InvalidPara
 import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.util.InternationalString;
 import org.apache.sis.util.Debug;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.Deprecable;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.iso.Types;
@@ -48,10 +47,14 @@ import java.util.Objects;
  * This kind of identifier is primarily used for identification of
  * {@link org.opengis.referencing.crs.CoordinateReferenceSystem} objects.
  *
- * {@note While <code>ImmutableIdentifier</code> objects are immutable, they may contain references to
- *        <code>Citation</code> and <code>InternationalString</code> objects which are not guaranteed
- *        to be immutable. For better safety, factory codes are encouraged to pass only immutable
- *        citations and immutable international strings to the constructors.}
+ *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus inherently thread-safe if the {@link Citation} and {@link InternationalString}
+ * arguments given to the constructor are also immutable. It is caller's responsibility to ensure that those
+ * conditions hold, for example by invoking {@link org.apache.sis.metadata.iso.citation.DefaultCitation#freeze()
+ * DefaultCitation.freeze()} before passing the arguments to the constructor.
+ * Subclasses shall make sure that any overridden methods remain safe to call from multiple threads and do not change
+ * any public {@code ImmutableIdentifier} state.
  *
  *
  * {@section Text, URN and XML representations}
@@ -120,7 +123,6 @@ import java.util.Objects;
  *
  * @see DefaultIdentifier
  */
-@Immutable
 @XmlRootElement(name = "RS_Identifier")
 public class ImmutableIdentifier implements ReferenceIdentifier, Deprecable, Serializable {
     /**

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -28,7 +28,6 @@ import org.opengis.geometry.MismatchedDi
 import org.opengis.geometry.MismatchedReferenceSystemException;
 import org.opengis.referencing.crs.CoordinateReferenceSystem;
 import org.opengis.metadata.extent.GeographicBoundingBox;
-import org.apache.sis.util.Immutable;
 
 import static org.apache.sis.util.ArgumentChecks.ensureDimensionMatches;
 
@@ -38,10 +37,9 @@ import static org.apache.sis.util.Argume
  * This class is final in order to ensure that the immutability contract can not be broken
  * (assuming not using <cite>Java Native Interface</cite> or reflections).
  *
- * {@note While <code>ImmutableEnvelope</code> objects are immutable, they contain references to
- *        <code>CoordinateReferenceSystem</code> objects which are not guaranteed to be immutable.
- *        For better safety, factory codes are encouraged to pass only immutable instances of
- *        coordinate reference systems to the constructors.}
+ * {@section Immutability and thread safety}
+ * This final class is immutable and thus inherently thread-safe if the {@link CoordinateReferenceSystem}
+ * instance given to the constructor is immutable. This is usually the case in Apache SIS.
  *
  * @author  Cédric Briançon (Geomatys)
  * @author  Martin Desruisseaux (IRD, Geomatys)
@@ -49,7 +47,6 @@ import static org.apache.sis.util.Argume
  * @version 0.3
  * @module
  */
-@Immutable
 public final class ImmutableEnvelope extends ArrayEnvelope implements Serializable {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractIdentifiedObject.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -98,12 +98,12 @@ import java.util.Objects;
  *       All other information are fetched from the database.</li>
  * </ul>
  *
- * {@section Thread safety}
+ * {@section Immutability and thread safety}
  * This base class is immutable if the {@link Citation}, {@link ReferenceIdentifier}, {@link GenericName} and
- * {@link InternationalString} instances given to the constructor are also immutable. Most SIS subclasses are
- * immutable under the same conditions. This means that unless otherwise noted in the javadoc,
- * {@code IdentifiedObject} instances created by SIS factories can be shared by many objects and passed between
- * threads without synchronization.
+ * {@link InternationalString} instances given to the constructor are also immutable. Most SIS subclasses and
+ * related classes are immutable under similar conditions. This means that unless otherwise noted in the javadoc,
+ * {@code IdentifiedObject} instances created using only SIS factories and static constants can be shared by many
+ * objects and passed between threads without synchronization.
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-1.2)

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/AbstractReferenceSystem.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import org.opengis.referencing.Reference
 import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.metadata.extent.Extent;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.iso.Types;
 
 import static org.apache.sis.util.Utilities.deepEquals;
@@ -49,12 +48,18 @@ import java.util.Objects;
  * This class is conceptually <cite>abstract</cite>, even if it is technically possible to instantiate it.
  * Typical applications should create instances of the most specific subclass prefixed by {@code Default} instead.
  *
+ * {@section Immutability and thread safety}
+ * This base class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Most SIS subclasses and related classes are immutable under similar
+ * conditions. This means that unless otherwise noted in the javadoc, {@code ReferenceSystem} instances created using
+ * only SIS factories and static constants can be shared by many objects and passed between threads without
+ * synchronization.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.1)
  * @version 0.4
  * @module
  */
-@Immutable
 public class AbstractReferenceSystem extends AbstractIdentifiedObject implements ReferenceSystem {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/NamedIdentifier.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -33,7 +33,6 @@ import org.apache.sis.internal.system.De
 import org.apache.sis.metadata.iso.citation.Citations;
 import org.apache.sis.metadata.iso.ImmutableIdentifier;
 import org.apache.sis.util.collection.WeakValueHashMap;
-import org.apache.sis.util.Immutable;
 
 // Related to JDK7
 import java.util.Objects;
@@ -64,12 +63,20 @@ import java.util.Objects;
  * as the name {@linkplain ScopedName#tip() tip}. Note that according ISO 19115, citation alternate titles often
  * contains abbreviation (for example "DCW" as an alternative title for "<cite>Digital Chart of the World</cite>").
  *
+ *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus inherently thread-safe if the {@link Citation} and {@link InternationalString}
+ * arguments given to the constructor are also immutable. It is caller's responsibility to ensure that those
+ * conditions hold, for example by invoking {@link org.apache.sis.metadata.iso.citation.DefaultCitation#freeze()
+ * DefaultCitation.freeze()} before passing the arguments to the constructor.
+ * Subclasses shall make sure that any overridden methods remain safe to call from multiple threads and do not change
+ * any public {@code NamedIdentifier} state.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class NamedIdentifier extends ImmutableIdentifier implements GenericName {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/AbstractCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -31,7 +31,6 @@ import org.opengis.referencing.cs.Coordi
 import org.apache.sis.referencing.AbstractIdentifiedObject;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.io.wkt.Formatter;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.resources.Errors;
 
@@ -51,6 +50,13 @@ import static org.apache.sis.util.Utilit
  * (e.g. in a {@code LOCAL_CS} element). In such exceptional situation, a plain {@code AbstractCS} object may be
  * instantiated.</p>
  *
+ * {@section Immutability and thread safety}
+ * This base class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Most SIS subclasses and
+ * related classes are immutable under similar conditions. This means that unless otherwise noted in the javadoc,
+ * {@code CoordinateSystem} instances created using only SIS factories and static constants can be shared by many
+ * objects and passed between threads without synchronization.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
@@ -59,7 +65,6 @@ import static org.apache.sis.util.Utilit
  * @see DefaultCoordinateSystemAxis
  * @see org.apache.sis.referencing.crs.AbstractCRS
  */
-@Immutable
 public class AbstractCS extends AbstractIdentifiedObject implements CoordinateSystem {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultAffineCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.measure.Units;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ComparisonMode;
 
 
@@ -42,12 +41,17 @@ import org.apache.sis.util.ComparisonMod
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultAffineCS extends AbstractCS implements AffineCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCartesianCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import org.opengis.referencing.cs.Coordi
 import org.apache.sis.internal.referencing.Formulas;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 
 /**
@@ -47,12 +46,17 @@ import org.apache.sis.util.Immutable;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultCartesianCS extends DefaultAffineCS implements CartesianCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCompoundCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import org.opengis.referencing.cs.Coordi
 import org.apache.sis.internal.util.UnmodifiableArrayList;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.Workaround;
-import org.apache.sis.util.Immutable;
 
 import static java.util.Collections.singletonMap;
 import static org.apache.sis.util.ArgumentChecks.*;
@@ -41,12 +40,17 @@ import static org.apache.sis.util.Utilit
  *   <td>(not applicable)</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultCompoundCS extends AbstractCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCoordinateSystemAxis.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -37,7 +37,6 @@ import org.apache.sis.referencing.Identi
 import org.apache.sis.measure.Longitude;
 import org.apache.sis.measure.Latitude;
 import org.apache.sis.measure.Units;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.resources.Errors;
 import org.apache.sis.internal.util.Numerics;
@@ -61,6 +60,11 @@ import java.util.Objects;
  * with a {@link org.opengis.referencing.crs.GeographicCRS}. Conversely, these names shall not be used
  * in any other context. See the GeoAPI {@link CoordinateSystemAxis} javadoc for more information.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if all
+ * components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
@@ -69,7 +73,6 @@ import java.util.Objects;
  * @see AbstractCS
  * @see Unit
  */
-@Immutable
 public class DefaultCoordinateSystemAxis extends AbstractIdentifiedObject implements CoordinateSystemAxis {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultCylindricalCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.measure.Units;
 
 
@@ -39,6 +38,12 @@ import org.apache.sis.measure.Units;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
@@ -46,7 +51,6 @@ import org.apache.sis.measure.Units;
  *
  * @see DefaultPolarCS
  */
-@Immutable
 public class DefaultCylindricalCS extends AbstractCS implements CylindricalCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultEllipsoidalCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.measure.Units;
 
 
@@ -41,12 +40,17 @@ import org.apache.sis.measure.Units;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultEllipsoidalCS extends AbstractCS implements EllipsoidalCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultLinearCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import org.opengis.referencing.cs.Coordi
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.measure.Units;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 
 /**
@@ -40,12 +39,17 @@ import org.apache.sis.util.Immutable;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultLinearCS extends AbstractCS implements LinearCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultPolarCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import org.opengis.referencing.cs.Coordi
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.measure.Units;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 
 /**
@@ -39,12 +38,17 @@ import org.apache.sis.util.Immutable;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultPolarCS extends AbstractCS implements PolarCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultSphericalCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.measure.Units;
 
 
@@ -43,12 +42,17 @@ import org.apache.sis.measure.Units;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultSphericalCS extends AbstractCS implements SphericalCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultTimeCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.measure.Units;
 
 
@@ -39,12 +38,17 @@ import org.apache.sis.measure.Units;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultTimeCS extends AbstractCS implements TimeCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultUserDefinedCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -20,18 +20,22 @@ import java.util.Map;
 import org.opengis.referencing.cs.UserDefinedCS;
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 
 /**
  * A 2- or 3-dimensional coordinate system for any combination of coordinate axes not covered by other CS types.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultUserDefinedCS extends AbstractCS implements UserDefinedCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DefaultVerticalCS.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import org.opengis.referencing.cs.AxisDi
 import org.opengis.referencing.cs.CoordinateSystemAxis;
 import org.apache.sis.internal.referencing.AxisDirections;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 
 /**
@@ -51,12 +50,17 @@ import org.apache.sis.util.Immutable;
  *   <td>unspecified</td>
  * </tr></table>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * and the {@link CoordinateSystemAxis} instances given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 public class DefaultVerticalCS extends AbstractCS implements VerticalCS {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/DirectionAlongMeridian.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -20,7 +20,6 @@ import java.io.Serializable;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import org.opengis.referencing.cs.AxisDirection;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.internal.referencing.AxisDirections;
@@ -30,12 +29,14 @@ import org.apache.sis.internal.referenci
  * Parses {@linkplain AxisDirection axis direction} of the kind "<cite>South along 90 deg East</cite>".
  * Those directions are used in the EPSG database for polar stereographic projections.
  *
+ * {@section Immutability and thread safety}
+ * This final class is immutable and thus inherently thread-safe.
+ *
  * @author  Martin Desruisseaux (IRD)
  * @since   0.4 (derived from geotk-2.4)
  * @version 0.4
  * @module
  */
-@Immutable
 final class DirectionAlongMeridian implements Comparable<DirectionAlongMeridian>, Serializable {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/AbstractDatum.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -32,7 +32,6 @@ import org.apache.sis.referencing.Identi
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.iso.Types;
 import org.apache.sis.util.Classes;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.internal.jaxb.gco.DateAsLongAdapter;
@@ -55,6 +54,12 @@ import java.util.Objects;
  * This class is conceptually <cite>abstract</cite>, even if it is technically possible to instantiate it.
  * Typical applications should create instances of the most specific subclass prefixed by {@code Default} instead.
  *
+ * {@section Immutability and thread safety}
+ * This base class is immutable if the property <em>values</em> (not necessarily the map itself) given to the
+ * constructor are also immutable. Most SIS subclasses and related classes are immutable under similar conditions.
+ * This means that unless otherwise noted in the javadoc, {@code Datum} instances created using only SIS factories
+ * and static constants can be shared by many objects and passed between threads without synchronization.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-1.2)
  * @version 0.4
@@ -63,7 +68,6 @@ import java.util.Objects;
  * @see org.apache.sis.referencing.cs.AbstractCS
  * @see org.apache.sis.referencing.crs.AbstractCRS
  */
-@Immutable
 @XmlType(name="AbstractDatumType")
 @XmlSeeAlso(
     DefaultGeodeticDatum.class

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEllipsoid.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -37,7 +37,6 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.referencing.IdentifiedObjects;
 import org.apache.sis.referencing.AbstractIdentifiedObject;
 import org.apache.sis.io.wkt.Formatter;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.util.resources.Errors;
 
@@ -105,6 +104,11 @@ import java.util.Objects;
  *     Ellipsoid e = GeodeticObjects.WGS84.ellipsoid();
  * }
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructors are also immutable. Unless otherwise noted in the javadoc, this condition holds if all
+ * components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.4 (derived from geotk-1.2)
@@ -113,7 +117,6 @@ import java.util.Objects;
  *
  * @see org.apache.sis.referencing.GeodeticObjects#ellipsoid()
  */
-@Immutable
 @XmlType(name="EllipsoidType", propOrder={
     "semiMajorAxisMeasure",
     "secondDefiningParameter"

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultEngineeringDatum.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import org.opengis.util.InternationalStr
 import org.opengis.referencing.ReferenceIdentifier;
 import org.opengis.referencing.datum.EngineeringDatum;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.io.wkt.Formatter;
 
 
@@ -34,12 +33,16 @@ import org.apache.sis.io.wkt.Formatter;
  * This origin can be fixed with respect to the earth (such as a defined point at a construction site),
  * or be a defined point on a moving vehicle (such as on a ship or satellite).
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if all
+ * components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-1.2)
  * @version 0.4
  * @module
  */
-@Immutable
 @XmlType(name = "EngineeringDatumType")
 @XmlRootElement(name = "EngineeringDatum")
 public class DefaultEngineeringDatum extends AbstractDatum implements EngineeringDatum {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultGeodeticDatum.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -37,7 +37,6 @@ import org.apache.sis.internal.referenci
 import org.apache.sis.internal.util.CollectionsExt;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.io.wkt.FormattableObject;
 
@@ -104,6 +103,12 @@ import java.util.Objects;
  *     GeodeticDatum datum = GeodeticObjects.WGS84.datum();
  * }
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself),
+ * the {@link Ellipsoid} and the {@link PrimeMeridian} given to the constructor are also immutable. Unless otherwise
+ * noted in the javadoc, this condition holds if all components were created using only SIS factories and static
+ * constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-1.2)
  * @version 0.4
@@ -113,7 +118,6 @@ import java.util.Objects;
  * @see DefaultPrimeMeridian
  * @see org.apache.sis.referencing.GeodeticObjects#datum()
  */
-@Immutable
 @XmlType(name = "GeodeticDatumType", propOrder = {
     "primeMeridian",
     "ellipsoid"

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultImageDatum.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -26,7 +26,6 @@ import org.opengis.referencing.datum.Ima
 import org.opengis.referencing.datum.PixelInCell;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 
@@ -39,12 +38,16 @@ import java.util.Objects;
  * context only. For an image datum, the anchor point is usually either the centre of the image
  * or the corner of the image.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if
+ * all components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 @XmlType(name = "ImageDatumType")
 @XmlRootElement(name = "ImageDatum")
 public class DefaultImageDatum extends AbstractDatum implements ImageDatum {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultPrimeMeridian.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -32,7 +32,6 @@ import org.apache.sis.internal.jaxb.gco.
 import org.apache.sis.internal.util.Numerics;
 import org.apache.sis.io.wkt.Formatter;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 import static org.apache.sis.util.ArgumentChecks.ensureFinite;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
@@ -71,6 +70,11 @@ import java.util.Objects;
  *     PrimeMeridian pm = GeodeticObjects.WGS84.primeMeridian();
  * }
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if
+ * all components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Cédric Briançon (Geomatys)
  * @since   0.4 (derived from geotk-1.2)
@@ -79,7 +83,6 @@ import java.util.Objects;
  *
  * @see org.apache.sis.referencing.GeodeticObjects#primeMeridian()
  */
-@Immutable
 @XmlType(name = "PrimeMeridianType")
 @XmlRootElement(name = "PrimeMeridian")
 public class DefaultPrimeMeridian extends AbstractIdentifiedObject implements PrimeMeridian {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultTemporalDatum.java Thu Dec 26 00:00:47 2013
@@ -26,7 +26,6 @@ import org.opengis.referencing.Reference
 import org.opengis.referencing.datum.TemporalDatum;
 import org.apache.sis.internal.metadata.MetadataUtilities;
 import org.apache.sis.util.ComparisonMode;
-import org.apache.sis.util.Immutable;
 
 import static org.apache.sis.internal.util.Numerics.hash;
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
@@ -61,6 +60,11 @@ import java.util.Objects;
  *     TemporalDatum datum = GeodeticObjects.Temporal.JULIAN.datum();
  * }
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if
+ * all components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-1.2)
  * @version 0.4
@@ -68,7 +72,6 @@ import java.util.Objects;
  *
  * @see org.apache.sis.referencing.GeodeticObjects.Temporal#datum()
  */
-@Immutable
 @XmlType(name = "TemporalDatumType")
 @XmlRootElement(name = "TemporalDatum")
 public class DefaultTemporalDatum extends AbstractDatum implements TemporalDatum {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/DefaultVerticalDatum.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -26,7 +26,6 @@ import org.opengis.referencing.Reference
 import org.opengis.referencing.datum.VerticalDatum;
 import org.opengis.referencing.datum.VerticalDatumType;
 import org.apache.sis.io.wkt.Formatter;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ComparisonMode;
 import org.apache.sis.internal.jaxb.Context;
 import org.apache.sis.internal.jaxb.LegacyNamespaces;
@@ -67,6 +66,11 @@ import java.util.Objects;
  *     VerticalDatum datum = GeodeticObjects.Vertical.GEOID.datum();
  * }
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if
+ * all components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-1.2)
  * @version 0.4
@@ -74,7 +78,6 @@ import java.util.Objects;
  *
  * @see org.apache.sis.referencing.GeodeticObjects.Vertical#datum()
  */
-@Immutable
 @XmlType(name = "VerticalDatumType")
 @XmlRootElement(name = "VerticalDatum")
 public class DefaultVerticalDatum extends AbstractDatum implements VerticalDatum {

Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/datum/Sphere.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -20,7 +20,6 @@ import java.util.Map;
 import javax.measure.unit.Unit;
 import javax.measure.quantity.Length;
 import javax.xml.bind.annotation.XmlTransient;
-import org.apache.sis.util.Immutable;
 
 import static java.lang.Math.*;
 
@@ -29,12 +28,16 @@ import static java.lang.Math.*;
  * A ellipsoid which is spherical. This ellipsoid implements a faster
  * {@link #orthodromicDistance(double, double, double, double)} method.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus thread-safe if the property <em>values</em> (not necessarily the map itself)
+ * given to the constructor are also immutable. Unless otherwise noted in the javadoc, this condition holds if
+ * all components were created using only SIS factories and static constants.
+ *
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @since   0.4 (derived from geotk-2.0)
  * @version 0.4
  * @module
  */
-@Immutable
 @XmlTransient
 final class Sphere extends DefaultEllipsoid {
     /**

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/AngleConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/AngleConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/AngleConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/AngleConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.converte
 
 import java.util.Set;
 import org.apache.sis.measure.Angle;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
 
@@ -26,12 +25,15 @@ import org.apache.sis.math.FunctionPrope
 /**
  * Handles conversions between {@link Angle} and {@link Double}.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus inherently thread-safe.
+ * The same {@link #INSTANCE} can be passed between threads without synchronization.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.00)
  * @version 0.3
  * @module
  */
-@Immutable
 public final class AngleConverter extends SystemConverter<Angle,Double> {
     /** For cross-version compatibility. */
     private static final long serialVersionUID = -5124032874967170238L;
@@ -67,8 +69,10 @@ public final class AngleConverter extend
 
     /**
      * The inverse of {@link AngleConverter}.
+     *
+     * {@section Thread safety}
+     * This class is immutable, and thus inherently thread-safe.
      */
-    @Immutable
     public static final class Inverse extends SystemConverter<Double,Angle> {
         /** For cross-version compatibility. */
         private static final long serialVersionUID = -1736966474591258159L;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ArrayConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ArrayConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ArrayConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ArrayConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -20,7 +20,6 @@ import java.util.Set;
 import java.util.EnumSet;
 import java.lang.reflect.Array;
 import org.apache.sis.math.FunctionProperty;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.Numbers;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.util.UnconvertibleObjectException;
@@ -32,12 +31,15 @@ import org.apache.sis.util.Unconvertible
  * the source and target types of the element converter shall be {@code <? super S>} and {@code <? extends T>}
  * respectively.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable, and thus inherently thread-safe,
+ * if the converter given to the constructor is also immutable.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3
  * @version 0.3
  * @module
  */
-@Immutable
 final class ArrayConverter<S,T> extends SystemConverter<S,T> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CharSequenceConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CharSequenceConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CharSequenceConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CharSequenceConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.converte
 
 import java.util.EnumSet;
 import java.util.Set;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
 import org.apache.sis.util.UnconvertibleObjectException;
@@ -33,12 +32,15 @@ import org.apache.sis.util.Unconvertible
  * <p>The main purpose of this class is to support the conversion of
  * {@link org.opengis.util.InternationalString}.</p>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable, and thus inherently thread-safe,
+ * if the converter given to the constructor is also immutable.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.02)
  * @version 0.3
  * @module
  */
-@Immutable
 final class CharSequenceConverter<T> extends SystemConverter<CharSequence,T> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ClassPair.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.converte
 
 import java.io.Serializable;
 import org.apache.sis.util.ObjectConverter;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.Debug;
 
 
@@ -30,6 +29,11 @@ import org.apache.sis.util.Debug;
  * <strong>No other direct subtype shall exist</strong>.
  * See {@link #equals(Object)} for an explanation.</p>
  *
+ * {@section Immutability and thread safety}
+ * This base class is immutable and thus inherently thread-safe. {@code ClassPair} immutability is necessary
+ * for {@link ConverterRegistry}. Subclasses should also be immutable, but this requirement is not as strong
+ * as for {@code ClassPair} (because subclasses are not used as keys in hash map).
+ *
  * @param <S> The base type of source objects.
  * @param <T> The base type of converted objects.
  *
@@ -38,7 +42,6 @@ import org.apache.sis.util.Debug;
  * @version 0.3
  * @module
  */
-@Immutable
 class ClassPair<S,T> implements Serializable {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/CollectionConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -20,7 +20,6 @@ import java.util.Collection;
 import java.util.ArrayList;
 import java.util.EnumSet;
 import java.util.LinkedHashSet;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.math.FunctionProperty;
 
 
@@ -29,12 +28,15 @@ import org.apache.sis.math.FunctionPrope
  * The source class is fixed to {@code Collection}. The target class is determined
  * by the inner class which extends this {@code CollectionConverter} class.
  *
+ * {@section Immutability and thread safety}
+ * This base class is immutable, and thus inherently thread-safe. Subclasses should be immutable
+ * and thread-safe too if they are intended to be cached in {@link ConverterRegistry}.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.02)
  * @version 0.3
  * @module
  */
-@Immutable
 abstract class CollectionConverter<T> extends SystemConverter<Collection<?>,T> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/DateConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -19,7 +19,6 @@ package org.apache.sis.internal.converte
 import java.util.Date;
 import java.util.Set;
 import java.util.EnumSet;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
 
@@ -35,12 +34,14 @@ import org.apache.sis.math.FunctionPrope
  * The converter from dates to timestamps is not injective, because the same date could be mapped
  * to many timestamps since timestamps have an additional nanoseconds field.
  *
+ * {@section Immutability and thread safety}
+ * This base class and all inner classes are immutable, and thus inherently thread-safe.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.4)
  * @version 0.3
  * @module
  */
-@Immutable
 abstract class DateConverter<T> extends SystemConverter<Date,T> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/FallbackConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -20,7 +20,6 @@ import java.util.Arrays;
 import java.util.Set;
 import java.util.EnumSet;
 import java.util.Iterator;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.Classes;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
@@ -48,6 +47,10 @@ import org.apache.sis.util.Debug;
  * It is invoked when a new converter is {@linkplain ConverterRegistry#register(ObjectConverter)
  * registered} for the same source and target class than an existing converter.</p>
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable, and thus inherently thread-safe,
+ * if the converters given to the static factory method are also immutable.
+ *
  * @param <S> The base type of source objects.
  * @param <T> The base type of converted objects.
  *
@@ -56,7 +59,6 @@ import org.apache.sis.util.Debug;
  * @version 0.3
  * @module
  */
-@Immutable
 final class FallbackConverter<S,T> extends SystemConverter<S,T> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/IdentityConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.converte
 
 import java.util.Set;
 import java.util.EnumSet;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
 
@@ -26,6 +25,9 @@ import org.apache.sis.math.FunctionPrope
 /**
  * An object converter which returns the source unchanged.
  *
+ * {@section Immutability and thread safety}
+ * This class is immutable and thus inherently thread-safe.
+ *
  * @param <S> The base type of source objects.
  * @param <T> The base type of converted objects.
  *
@@ -36,7 +38,6 @@ import org.apache.sis.math.FunctionPrope
  *
  * @see org.apache.sis.util.ObjectConverters#identity(Class)
  */
-@Immutable
 public final class IdentityConverter<S extends T, T> extends SystemConverter<S,T> {
     /**
      * For cross-version compatibility.
@@ -71,8 +72,9 @@ public final class IdentityConverter<S e
      * This method returns a new {@link EnumSet} instead than returning a constant, because
      * creating {@code EnumSet} is cheap and the standard JDK implementation has optimizations
      * for bulk operations between {@code EnumSet} instances. Those optimizations are lost (at
-     * least on JDK6) is we wrap the {@code EnumSet} in a {@code Collections.unmodifiableSet}
-     * view.
+     * least on JDK6) is we wrap the {@code EnumSet} in a {@code Collections.unmodifiableSet} view.
+     *
+     * @return The manners in which source values are mapped to target values.
      */
     @Override
     public Set<FunctionProperty> properties() {
@@ -85,6 +87,8 @@ public final class IdentityConverter<S e
 
     /**
      * Returns the inverse converter, if any.
+     *
+     * @return A converter for converting instances of <var>T</var> back to instances of <var>S</var>.
      */
     @Override
     public ObjectConverter<T,S> inverse() throws UnsupportedOperationException {
@@ -95,6 +99,7 @@ public final class IdentityConverter<S e
      * Returns the given object unchanged.
      *
      * @param source The value to convert.
+     * @return The given value unchanged.
      */
     @Override
     public T apply(final S source) {

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/NumberConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/NumberConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/NumberConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/NumberConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.converte
 
 import java.util.Set;
 import java.util.EnumSet;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.Numbers;
 import org.apache.sis.math.FunctionProperty;
 import org.apache.sis.util.ObjectConverter;
@@ -41,6 +40,9 @@ import org.apache.sis.util.resources.Err
  * If nevertheless performance appears to be a problem, consider reverting to revision 1455255
  * of this class, which was using one subclass per target type as described above.
  *
+ * {@section Immutability and thread safety}
+ * This class and all inner classes are immutable, and thus inherently thread-safe.
+ *
  * @param <S> The source number type.
  * @param <T> The target number type.
  *
@@ -49,7 +51,6 @@ import org.apache.sis.util.resources.Err
  * @version 0.3
  * @module
  */
-@Immutable
 final class NumberConverter<S extends Number, T extends Number> extends SystemConverter<S,T> {
     /**
      * For cross-version compatibility.
@@ -122,7 +123,6 @@ final class NumberConverter<S extends Nu
      * Converter from numbers to comparables. This special case exists because {@link Number}
      * does not implement {@link java.lang.Comparable} directly, but all known subclasses do.
      */
-    @Immutable
     static final class Comparable<S extends Number> extends SystemConverter<S, java.lang.Comparable<?>> {
         /**
          * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/ObjectToString.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -18,7 +18,6 @@ package org.apache.sis.internal.converte
 
 import java.util.Set;
 import java.util.EnumSet;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.math.FunctionProperty;
 
@@ -35,6 +34,9 @@ import org.apache.sis.math.FunctionPrope
  *     ObjectConverter<S,String> c = StringConverter.getInstance(sourceClass).inverse();
  * }
  *
+ * {@section Immutability and thread safety}
+ * This base class and all inner classes are immutable, and thus inherently thread-safe.
+ *
  * @param <S> The source type.
  *
  * @author  Martin Desruisseaux (Geomatys)
@@ -42,7 +44,6 @@ import org.apache.sis.math.FunctionPrope
  * @version 0.3
  * @module
  */
-@Immutable
 class ObjectToString<S> extends SystemConverter<S,String> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/PathConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -24,7 +24,6 @@ import java.net.URI;
 import java.net.MalformedURLException;
 import java.net.URISyntaxException;
 import org.apache.sis.math.FunctionProperty;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.util.UnconvertibleObjectException;
 
@@ -32,12 +31,14 @@ import org.apache.sis.util.Unconvertible
 /**
  * Handles conversions between {@link Path}, {@link File}, {@link URI} and {@link URL} objects.
  *
+ * {@section Immutability and thread safety}
+ * This base class and all inner classes are immutable, and thus inherently thread-safe.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-3.01)
  * @version 0.3
  * @module
  */
-@Immutable
 abstract class PathConverter<S,T> extends SystemConverter<S,T> {
     /**
      * For cross-version compatibility.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/StringConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -26,7 +26,6 @@ import java.nio.file.InvalidPathExceptio
 import org.apache.sis.math.FunctionProperty;
 import org.apache.sis.util.Locales;
 import org.apache.sis.util.Numbers;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.util.CharSequences;
 import org.apache.sis.util.ObjectConverter;
 import org.apache.sis.util.UnconvertibleObjectException;
@@ -59,12 +58,14 @@ import org.apache.sis.util.iso.SimpleInt
  *    <tr><td>{@code "0"}     </td><td>{@link java.lang.Boolean#FALSE} </td></tr>
  * </table>
  *
+ * {@section Immutability and thread safety}
+ * This base class and all inner classes are immutable, and thus inherently thread-safe.
+ *
  * @author  Martin Desruisseaux (Geomatys)
  * @since   0.3 (derived from geotk-2.4)
  * @version 0.3
  * @module
  */
-@Immutable
 abstract class StringConverter<T> extends SystemConverter<String, T> {
     /**
      * For cross-version compatibility.
@@ -149,7 +150,6 @@ abstract class StringConverter<T> extend
     /**
      * Converter from {@link String} to various kinds of {@link java.lang.Number}.
      */
-    @Immutable
     public static final class Number extends StringConverter<java.lang.Number> {
         private static final long serialVersionUID = 8356246549731207392L;
         public Number() {super(java.lang.Number.class);} // Instantiated by ServiceLoader.
@@ -330,7 +330,6 @@ abstract class StringConverter<T> extend
      * <p>Instances of this class are created by
      * {@link SystemRegistry#createConverter(Class, Class)}.</p>
      */
-    @Immutable
     static final class CodeList<T extends org.opengis.util.CodeList<T>> extends StringConverter<T> {
         /** For cross-version compatibility on serialization. */
         private static final long serialVersionUID = -6351669842222010105L;

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/converter/SystemConverter.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -26,8 +26,11 @@ import org.apache.sis.util.resources.Err
 
 /**
  * Base class of all converters defined in the {@code org.apache.sis.internal} package.
- * Those converters are returned by system-wide {@link ConverterRegitry}, and cached for
- * reuse.
+ * Those converters are returned by system-wide {@link ConverterRegitry}, and cached for reuse.
+ *
+ * {@section Immutability and thread safety}
+ * This base class is immutable, and thus inherently thread-safe. Subclasses should be immutable
+ * and thread-safe too if they are intended to be cached in {@link ConverterRegistry}.
  *
  * @param <S> The base type of source objects.
  * @param <T> The base type of converted objects.
@@ -111,6 +114,10 @@ abstract class SystemConverter<S,T> exte
      *       (as in {@link ConverterRegistry#find(Class, Class)}), the key shall be
      *       an instance of {@code ClassPair} instance (not a subclass).</li>
      * </ul>
+     *
+     * @param  other The object to compare with this {@code SystemConverter}.
+     * @return {@code true} if the given object is a {@code ClassPair} or a converter of the
+     *         same class than {@code this}, and both have the same source and target classes.
      */
     @Override
     public final boolean equals(final Object other) {

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Angle.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -23,7 +23,6 @@ import java.util.FormattableFlags;
 import java.text.Format;
 import java.text.ParseException;
 import java.io.Serializable;
-import org.apache.sis.util.Immutable;
 import org.apache.sis.internal.util.Utilities;
 
 import static java.lang.Double.doubleToLongBits;
@@ -41,6 +40,11 @@ import static org.apache.sis.math.MathFu
  * {@code "%s"} conversion specifier of {@link Formatter}, but this is less efficient for this
  * class.
  *
+ * {@section Immutability and thread safety}
+ * This class and the {@link Latitude} / {@link Longitude} subclasses are immutable, and thus
+ * inherently thread-safe. Other subclasses may or may not be immutable, at implementation choice
+ * (see {@link java.lang.Number} for an example of a similar in purpose class having mutable subclasses).
+ *
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @since   0.3 (derived from geotk-1.0)
  * @version 0.3
@@ -50,7 +54,6 @@ import static org.apache.sis.math.MathFu
  * @see Longitude
  * @see AngleFormat
  */
-@Immutable
 public class Angle implements Comparable<Angle>, Formattable, Serializable {
     /**
      * Serial number for inter-operability with different versions.

Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java?rev=1553429&r1=1553428&r2=1553429&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/measure/Latitude.java [UTF-8] Thu Dec 26 00:00:47 2013
@@ -16,13 +16,14 @@
  */
 package org.apache.sis.measure;
 
-import org.apache.sis.util.Immutable;
-
 
 /**
  * A latitude angle in decimal degrees.
  * Positive latitudes are North, while negative latitudes are South.
  *
+ * {@section Immutability and thread safety}
+ * This final class is immutable and thus inherently thread-safe.
+ *
  * @author  Martin Desruisseaux (MPO, IRD, Geomatys)
  * @since   0.3 (derived from geotk-1.0)
  * @version 0.4
@@ -31,7 +32,6 @@ import org.apache.sis.util.Immutable;
  * @see Longitude
  * @see AngleFormat
  */
-@Immutable
 public final class Latitude extends Angle {
     /**
      * Serial number for inter-operability with different versions.



Mime
View raw message