You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2017/01/20 03:49:54 UTC
svn commit: r1779555 [13/13] - in /sis/branches/JDK7: ./
core/sis-feature/src/main/java/org/apache/sis/feature/
core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/
core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/geometry/ co...
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeorectified.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -58,6 +58,7 @@ import org.apache.sis.xml.Namespaces;
* @version 0.3
* @module
*/
+@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones.
@XmlType(name = "MD_Georectified_Type", propOrder = {
"checkPointAvailable",
"checkPointDescription",
@@ -135,7 +136,7 @@ public class DefaultGeorectified extends
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from, or {@code null} if none.
+ * @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Georectified)
*/
@@ -171,8 +172,8 @@ public class DefaultGeorectified extends
* metadata contained in the given object are not recursively copied.</li>
* </ul>
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultGeorectified castOrCopy(final Georectified object) {
@@ -186,7 +187,7 @@ public class DefaultGeorectified extends
* Returns an indication of whether or not geographic position points are available to test the
* accuracy of the georeferenced grid data.
*
- * @return Whether or not geographic position points are available to test accuracy.
+ * @return whether or not geographic position points are available to test accuracy.
*/
@Override
@XmlElement(name = "checkPointAvailability", required = true)
@@ -223,7 +224,7 @@ public class DefaultGeorectified extends
* georeferenced grid data. This value is non-null only if {@link #isCheckPointAvailable()}
* returns {@code true}.
*
- * @return Description of geographic position points used to test accuracy, or {@code null}.
+ * @return description of geographic position points used to test accuracy, or {@code null}.
*/
@Override
@XmlElement(name = "checkPointDescription")
@@ -239,7 +240,7 @@ public class DefaultGeorectified extends
* If and only if the given {@code newValue} is non-null, then this method automatically sets
* the {@linkplain #setCheckPointAvailable check point availability} property to {@code true}.
*
- * @param newValue The new check point description.
+ * @param newValue the new check point description.
*/
public void setCheckPointDescription(final InternationalString newValue) {
checkWritePermission();
@@ -253,7 +254,7 @@ public class DefaultGeorectified extends
* Returns the Earth location in the coordinate system defined by the Spatial Reference System
* and the grid coordinate of the cells at opposite ends of grid coverage along two diagonals.
*
- * @return The corner points.
+ * @return the corner points.
*/
@Override
@XmlElement(name = "cornerPoints", required = true)
@@ -270,7 +271,7 @@ public class DefaultGeorectified extends
*
* <p>The first corner point shall correspond to the origin of the grid.</p>
*
- * @param newValues The new corner points.
+ * @param newValues the new corner points.
*/
public void setCornerPoints(final List<? extends Point> newValues) {
cornerPoints = writeList(newValues, cornerPoints, Point.class);
@@ -281,7 +282,7 @@ public class DefaultGeorectified extends
* and the grid coordinate of the cell halfway between opposite ends of the grid in the
* spatial dimensions.
*
- * @return The center point, or {@code null}.
+ * @return the center point, or {@code null}.
*/
@Override
@XmlElement(name = "centerPoint")
@@ -292,7 +293,7 @@ public class DefaultGeorectified extends
/**
* Sets the center point.
*
- * @param newValue The new center point.
+ * @param newValue the new center point.
*/
public void setCenterPoint(final Point newValue) {
checkWritePermission();
@@ -302,7 +303,7 @@ public class DefaultGeorectified extends
/**
* Returns the point in a pixel corresponding to the Earth location of the pixel.
*
- * @return Earth location of the pixel, or {@code null}.
+ * @return earth location of the pixel, or {@code null}.
*/
@Override
@XmlElement(name = "pointInPixel", required = true)
@@ -313,7 +314,7 @@ public class DefaultGeorectified extends
/**
* Sets the point in a pixel corresponding to the Earth location of the pixel.
*
- * @param newValue The new point in a pixel.
+ * @param newValue the new point in a pixel.
*/
public void setPointInPixel(final PixelOrientation newValue) {
checkWritePermission();
@@ -323,7 +324,7 @@ public class DefaultGeorectified extends
/**
* Returns a general description of the transformation.
*
- * @return General description of the transformation, or {@code null}.
+ * @return general description of the transformation, or {@code null}.
*/
@Override
@XmlElement(name = "transformationDimensionDescription")
@@ -334,7 +335,7 @@ public class DefaultGeorectified extends
/**
* Sets a general description of the transformation.
*
- * @param newValue The new general description.
+ * @param newValue the new general description.
*/
public void setTransformationDimensionDescription(final InternationalString newValue) {
checkWritePermission();
@@ -344,7 +345,7 @@ public class DefaultGeorectified extends
/**
* Returns information about which grid dimensions are the spatial dimensions.
*
- * @return Information about which grid dimensions are the spatial dimensions, or {@code null}.
+ * @return information about which grid dimensions are the spatial dimensions, or {@code null}.
*/
@Override
@XmlElement(name = "transformationDimensionMapping")
@@ -356,7 +357,7 @@ public class DefaultGeorectified extends
* Sets information about which grid dimensions are the spatial dimensions.
* The given list should contain at most 2 elements.
*
- * @param newValues The new transformation mapping.
+ * @param newValues the new transformation mapping.
*/
public void setTransformationDimensionMapping(final Collection<? extends InternationalString> newValues) {
transformationDimensionMapping = writeCollection(newValues, transformationDimensionMapping, InternationalString.class);
@@ -365,7 +366,7 @@ public class DefaultGeorectified extends
/**
* Returns the geographic references used to validate georectification of the data.
*
- * @return Geographic references used to validate georectification.
+ * @return geographic references used to validate georectification.
*/
@Override
@XmlElement(name = "checkPoint", namespace = Namespaces.GMI)
@@ -376,7 +377,7 @@ public class DefaultGeorectified extends
/**
* Sets the geographic references used to validate georectification of the data.
*
- * @param newValues The new check points values.
+ * @param newValues the new check points values.
*/
public void setCheckPoints(final Collection<? extends GCP> newValues) {
checkPoints = writeCollection(newValues, checkPoints, GCP.class);
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGeoreferenceable.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -50,6 +50,7 @@ import org.apache.sis.xml.Namespaces;
* @version 0.3
* @module
*/
+@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones.
@XmlType(name = "MD_Georeferenceable_Type", propOrder = {
"controlPointAvailable",
"orientationParameterAvailable",
@@ -110,7 +111,7 @@ public class DefaultGeoreferenceable ext
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from, or {@code null} if none.
+ * @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(Georeferenceable)
*/
@@ -144,8 +145,8 @@ public class DefaultGeoreferenceable ext
* metadata contained in the given object are not recursively copied.</li>
* </ul>
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultGeoreferenceable castOrCopy(final Georeferenceable object) {
@@ -158,7 +159,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns an indication of whether or not control point(s) exists.
*
- * @return Whether or not control point(s) exists.
+ * @return whether or not control point(s) exists.
*/
@Override
@XmlElement(name = "controlPointAvailability", required = true)
@@ -183,7 +184,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns an indication of whether or not orientation parameters are available.
*
- * @return Whether or not orientation parameters are available.
+ * @return whether or not orientation parameters are available.
*/
@Override
@XmlElement(name = "orientationParameterAvailability", required = true)
@@ -208,7 +209,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns a description of parameters used to describe sensor orientation.
*
- * @return Description of parameters used to describe sensor orientation, or {@code null}.
+ * @return description of parameters used to describe sensor orientation, or {@code null}.
*/
@Override
@XmlElement(name = "orientationParameterDescription")
@@ -219,7 +220,7 @@ public class DefaultGeoreferenceable ext
/**
* Sets a description of parameters used to describe sensor orientation.
*
- * @param newValue The new orientation parameter description.
+ * @param newValue the new orientation parameter description.
*/
public void setOrientationParameterDescription(final InternationalString newValue) {
checkWritePermission();
@@ -229,7 +230,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns the terms which support grid data georeferencing.
*
- * @return Terms which support grid data georeferencing, or {@code null}.
+ * @return terms which support grid data georeferencing, or {@code null}.
*/
@Override
/// @XmlElement(name = "georeferencedParameters", required = true)
@@ -240,7 +241,7 @@ public class DefaultGeoreferenceable ext
/**
* Sets the terms which support grid data georeferencing.
*
- * @param newValue The new georeferenced parameters.
+ * @param newValue the new georeferenced parameters.
*/
public void setGeoreferencedParameters(final Record newValue) {
checkWritePermission();
@@ -250,7 +251,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns a reference providing description of the parameters.
*
- * @return Reference providing description of the parameters.
+ * @return reference providing description of the parameters.
*/
@Override
@XmlElement(name = "parameterCitation")
@@ -261,7 +262,7 @@ public class DefaultGeoreferenceable ext
/**
* Sets a reference providing description of the parameters.
*
- * @param newValues The new parameter citations.
+ * @param newValues the new parameter citations.
*/
public void setParameterCitations(final Collection<? extends Citation> newValues) {
parameterCitations = writeCollection(newValues, parameterCitations, Citation.class);
@@ -270,7 +271,7 @@ public class DefaultGeoreferenceable ext
/**
* Returns the information that can be used to geolocate the data.
*
- * @return A geolocalisation of the data.
+ * @return a geolocalisation of the data.
*/
@Override
@XmlElement(name = "geolocationInformation", namespace = Namespaces.GMI, required = true)
@@ -281,7 +282,7 @@ public class DefaultGeoreferenceable ext
/**
* Sets the information that can be used to geolocate the data.
*
- * @param newValues The new geolocation information values.
+ * @param newValues the new geolocation information values.
*/
public void setGeolocationInformation(final Collection<? extends GeolocationInformation> newValues) {
geolocationInformation = writeCollection(newValues, geolocationInformation, GeolocationInformation.class);
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultGridSpatialRepresentation.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -50,6 +50,7 @@ import static org.apache.sis.internal.me
* @version 0.5
* @module
*/
+@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones.
@XmlType(name = "MD_GridSpatialRepresentation_Type", propOrder = {
"numberOfDimensions",
"axisDimensionProperties",
@@ -122,7 +123,7 @@ public class DefaultGridSpatialRepresent
* metadata instances can also be obtained by unmarshalling an invalid XML document.
* </div>
*
- * @param object The metadata to copy values from, or {@code null} if none.
+ * @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(GridSpatialRepresentation)
*/
@@ -157,8 +158,8 @@ public class DefaultGridSpatialRepresent
* metadata contained in the given object are not recursively copied.</li>
* </ul>
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultGridSpatialRepresentation castOrCopy(final GridSpatialRepresentation object) {
@@ -178,7 +179,7 @@ public class DefaultGridSpatialRepresent
/**
* Returns the number of independent spatial-temporal axes.
*
- * @return Number of independent spatial-temporal axes, or {@code null}.
+ * @return number of independent spatial-temporal axes, or {@code null}.
*/
@Override
@ValueRange(minimum = 0)
@@ -190,7 +191,7 @@ public class DefaultGridSpatialRepresent
/**
* Sets the number of independent spatial-temporal axes.
*
- * @param newValue The new number of dimension, or {@code null}.
+ * @param newValue the new number of dimension, or {@code null}.
* @throws IllegalArgumentException if the given value is negative.
*/
public void setNumberOfDimensions(final Integer newValue) {
@@ -203,7 +204,7 @@ public class DefaultGridSpatialRepresent
/**
* Returns information about spatial-temporal axis properties.
*
- * @return Information about spatial-temporal axis properties.
+ * @return information about spatial-temporal axis properties.
*/
@Override
@XmlElement(name = "axisDimensionProperties", required = true)
@@ -214,7 +215,7 @@ public class DefaultGridSpatialRepresent
/**
* Sets the information about spatial-temporal axis properties.
*
- * @param newValues The new axis dimension properties.
+ * @param newValues the new axis dimension properties.
*/
public void setAxisDimensionProperties(final List<? extends Dimension> newValues) {
checkWritePermission();
@@ -225,7 +226,7 @@ public class DefaultGridSpatialRepresent
/**
* Returns the identification of grid data as point or cell.
*
- * @return Identification of grid data as point or cell, or {@code null}.
+ * @return identification of grid data as point or cell, or {@code null}.
*/
@Override
@XmlElement(name = "cellGeometry", required = true)
@@ -236,7 +237,7 @@ public class DefaultGridSpatialRepresent
/**
* Sets identification of grid data as point or cell.
*
- * @param newValue The new cell geometry.
+ * @param newValue the new cell geometry.
*/
public void setCellGeometry(final CellGeometry newValue) {
checkWritePermission();
@@ -246,7 +247,7 @@ public class DefaultGridSpatialRepresent
/**
* Returns indication of whether or not parameters for transformation exists.
*
- * @return Whether or not parameters for transformation exists.
+ * @return whether or not parameters for transformation exists.
*/
@Override
@XmlElement(name = "transformationParameterAvailability", required = true)
Modified: sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/spatial/DefaultVectorSpatialRepresentation.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -44,6 +44,7 @@ import org.opengis.metadata.spatial.Vect
* @version 0.3
* @module
*/
+@SuppressWarnings("CloneableClassWithoutClone") // ModifiableMetadata needs shallow clones.
@XmlType(name = "MD_VectorSpatialRepresentation_Type", propOrder = {
"topologyLevel",
"geometricObjects"
@@ -78,7 +79,7 @@ public class DefaultVectorSpatialReprese
* This is a <cite>shallow</cite> copy constructor, since the other metadata contained in the
* given object are not recursively copied.
*
- * @param object The metadata to copy values from, or {@code null} if none.
+ * @param object the metadata to copy values from, or {@code null} if none.
*
* @see #castOrCopy(VectorSpatialRepresentation)
*/
@@ -104,8 +105,8 @@ public class DefaultVectorSpatialReprese
* metadata contained in the given object are not recursively copied.</li>
* </ul>
*
- * @param object The object to get as a SIS implementation, or {@code null} if none.
- * @return A SIS implementation containing the values of the given object (may be the
+ * @param object the object to get as a SIS implementation, or {@code null} if none.
+ * @return a SIS implementation containing the values of the given object (may be the
* given object itself), or {@code null} if the argument was null.
*/
public static DefaultVectorSpatialRepresentation castOrCopy(final VectorSpatialRepresentation object) {
@@ -118,7 +119,7 @@ public class DefaultVectorSpatialReprese
/**
* Returns the code which identifies the degree of complexity of the spatial relationships.
*
- * @return The degree of complexity of the spatial relationships, or {@code null}.
+ * @return the degree of complexity of the spatial relationships, or {@code null}.
*/
@Override
@XmlElement(name = "topologyLevel")
@@ -129,7 +130,7 @@ public class DefaultVectorSpatialReprese
/**
* Sets the code which identifies the degree of complexity of the spatial relationships.
*
- * @param newValue The new topology level.
+ * @param newValue the new topology level.
*/
public void setTopologyLevel(final TopologyLevel newValue) {
checkWritePermission();
@@ -139,7 +140,7 @@ public class DefaultVectorSpatialReprese
/**
* Returns information about the geometric objects used in the dataset.
*
- * @return Information about the geometric objects used in the dataset, or {@code null}.
+ * @return information about the geometric objects used in the dataset, or {@code null}.
*/
@Override
@XmlElement(name = "geometricObjects")
@@ -150,7 +151,7 @@ public class DefaultVectorSpatialReprese
/**
* Sets information about the geometric objects used in the dataset.
*
- * @param newValues The new geometric objects.
+ * @param newValues the new geometric objects.
*/
public void setGeometricObjects(final Collection<? extends GeometricObjects> newValues) {
geometricObjects = writeCollection(newValues, geometricObjects, GeometricObjects.class);
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/CodeListMarshallingTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -52,7 +52,7 @@ public final strictfp class CodeListMars
/**
* Returns a XML string to use for testing purpose.
*
- * @param baseURL The base URL of XML schemas.
+ * @param baseURL the base URL of XML schemas.
*/
private static String getResponsiblePartyXML(final String baseURL) {
return "<gmd:CI_ResponsibleParty xmlns:gmd=\"" + Namespaces.GMD + "\">\n" +
@@ -66,7 +66,7 @@ public final strictfp class CodeListMars
/**
* Returns a XML string to use for testing purpose.
*
- * @param baseURL The base URL of XML schemas.
+ * @param baseURL the base URL of XML schemas.
*/
private static String getCitationXML(final String baseURL, final String language, final String value) {
return "<gmd:CI_Date xmlns:gmd=\"" + Namespaces.GMD + "\">\n" +
@@ -80,7 +80,7 @@ public final strictfp class CodeListMars
/**
* Tests marshaling using the default URL.
*
- * @throws JAXBException If an error occurred while marshaling the XML.
+ * @throws JAXBException if an error occurred while marshaling the XML.
*/
@Test
public void testDefaultURL() throws JAXBException {
@@ -98,7 +98,7 @@ public final strictfp class CodeListMars
/**
* Tests marshaling using the ISO URL.
*
- * @throws JAXBException If an error occurred while marshaling the XML.
+ * @throws JAXBException if an error occurred while marshaling the XML.
*/
@Test
public void testISO_URL() throws JAXBException {
@@ -118,7 +118,7 @@ public final strictfp class CodeListMars
/**
* Tests a code list localization.
*
- * @throws JAXBException If an error occurred while marshaling the XML.
+ * @throws JAXBException if an error occurred while marshaling the XML.
*/
@Test
public void testLocalization() throws JAXBException {
@@ -149,7 +149,7 @@ public final strictfp class CodeListMars
/**
* Tests marshaling of a code list which is not in the list of standard codes.
*
- * @throws JAXBException If an error occurred while marshaling the XML.
+ * @throws JAXBException if an error occurred while marshaling the XML.
*/
@Test
public void testExtraCodes() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/EnumMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/EnumMarshallingTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/EnumMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/EnumMarshallingTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -41,7 +41,7 @@ public final strictfp class EnumMarshall
/**
* Tests (un)marshaling of an enumeration.
*
- * @throws JAXBException If an error occurred while (un)marshaling the XML.
+ * @throws JAXBException if an error occurred while (un)marshaling the XML.
*/
@Test
public void testTopicCategories() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/PT_LocaleTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/PT_LocaleTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/PT_LocaleTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/code/PT_LocaleTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -115,7 +115,7 @@ public final strictfp class PT_LocaleTes
/**
* Tests marshalling of a few locales.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testMarshalling() throws JAXBException {
@@ -127,7 +127,7 @@ public final strictfp class PT_LocaleTes
/**
* Tests unmarshalling of a few locales.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testUnmarshalling() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/jaxb/metadata/replace/ServiceParameterTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -39,7 +39,7 @@ public final strictfp class ServiceParam
/**
* Creates the parameter to use for testing purpose.
*
- * @return The test parameter.
+ * @return the test parameter.
*/
public static ServiceParameter create() {
final MemberName paramName = Names.createMemberName(null, null, "Version", String.class);
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/WKTKeywordsTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -41,7 +41,7 @@ public final strictfp class WKTKeywordsT
* If a developer change the constant values without changing the constant names (for example in order to use the
* abridged WKT 2 keyword names instead that their long name), this is okay \u2014 just ignore this test.</p>
*
- * @throws ReflectiveOperationException should never happen.
+ * @throws ReflectiveOperationException if a field is not public, or other error related to reflexion.
*/
@Test
public void verifyConstantValues() throws ReflectiveOperationException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/internal/metadata/sql/TestDatabase.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -16,6 +16,8 @@
*/
package org.apache.sis.internal.metadata.sql;
+import java.nio.file.Files;
+import java.nio.file.Path;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.apache.sis.util.Debug;
@@ -23,10 +25,6 @@ import org.apache.sis.internal.system.Da
import static org.junit.Assume.*;
-// Branch-dependent imports
-import java.nio.file.Files;
-import java.nio.file.Path;
-
/**
* Utility methods for creating temporary databases with Derby.
@@ -107,7 +105,7 @@ public final strictfp class TestDatabase
ds.getClass().getMethod("setConnectionAttributes", String.class).invoke(ds, "drop=true");
try {
ds.getConnection().close();
- } catch (SQLException e) { // This is the expected exception.
+ } catch (SQLException e) { // This is the expected exception.
if (!Initializer.isSuccessfulShutdown(e)) {
throw e;
}
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/SymbolsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/SymbolsTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/SymbolsTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/io/wkt/SymbolsTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -100,7 +100,7 @@ public final strictfp class SymbolsTest
symbols.setPairedQuotes("\u201c\u201d", "\"\"");
assertEquals("quote", "\u201d", symbols.getQuote());
final Symbols c = assertSerializedEquals(symbols);
- assertNotSame(symbols, c); // Expect a new instance.
- assertEquals("quote", "\u201d", c.getQuote()); // Verify the recomputed value.
+ assertNotSame("Expected a new instance.", symbols, c);
+ assertEquals("quote", "\u201d", c.getQuote()); // Verify the recomputed value.
}
}
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/TreeTableViewTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -89,7 +89,7 @@ public final strictfp class TreeTableVie
/**
* Tests serialization.
*
- * @throws Exception If an error occurred during the serialization process.
+ * @throws Exception if an error occurred during the serialization process.
*/
@Test
@DependsOnMethod("testToString")
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/APIVerifier.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -63,9 +63,9 @@ public final strictfp class APIVerifier
/**
* Verifies the API changes for the ISO 19115 standard.
*
- * @throws IOException If an error occurred while reading the {@code "api-changes.properties"} file.
- * @throws ClassNotFoundException If a class declared in {@code "api-changes.properties"} has not been found.
- * @throws NoSuchMethodException If a method declared in {@code "api-changes.properties"} has not been found.
+ * @throws IOException if an error occurred while reading the {@code "api-changes.properties"} file.
+ * @throws ClassNotFoundException if a class declared in {@code "api-changes.properties"} has not been found.
+ * @throws NoSuchMethodException if a method declared in {@code "api-changes.properties"} has not been found.
*/
@Test
public void verifyISO1915() throws IOException, ClassNotFoundException, NoSuchMethodException {
@@ -85,8 +85,8 @@ public final strictfp class APIVerifier
/**
* Implementation of {@link #verifyISO1915()}.
*
- * @param standard The metadata standard.
- * @param changes The list of changes in the given metadata standard.
+ * @param standard the metadata standard.
+ * @param changes the list of changes in the given metadata standard.
*/
private void verifyAPI(final MetadataStandard standard, final Properties changes)
throws ClassNotFoundException, NoSuchMethodException
@@ -147,10 +147,10 @@ public final strictfp class APIVerifier
* <p>This method also opportunistically lists method signature changes if some are found.
* This is is for information purpose and shall not be included in the {@code api-changes.properties} file.</p>
*
- * @param releasedJAR Path to the JAR file of the GeoAPI interfaces implemented by the stable version of Apache SIS.
- * @param snapshotJAR Path to the JAR file of the GeoAPI interfaces that we would implement if it was released.
- * @param unitsJAR Path to the JAR file containing the {@code Unit} class. This is a GeoAPI dependency.
- * @param out Where to write the API differences between {@code releasedJAR} and {@code snapshotJAR}.
+ * @param releasedJAR path to the JAR file of the GeoAPI interfaces implemented by the stable version of Apache SIS.
+ * @param snapshotJAR path to the JAR file of the GeoAPI interfaces that we would implement if it was released.
+ * @param unitsJAR path to the JAR file containing the {@code Unit} class. This is a GeoAPI dependency.
+ * @param out where to write the API differences between {@code releasedJAR} and {@code snapshotJAR}.
* @throws ReflectiveOperationException if an error occurred while processing the JAR file content.
* @throws IOException if an error occurred while reading the JAR files or writing to {@code out}.
*/
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/AllMetadataTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -339,7 +339,7 @@ public final strictfp class AllMetadataT
* Returns {@code true} if the given method is a non-standard extension.
* If {@code true}, then {@code method} does not need to have UML annotation.
*
- * @param method The method to verify.
+ * @param method the method to verify.
* @return {@code true} if the given method is an extension, or {@code false} otherwise.
*
* @since 0.5
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/CustomMetadataTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -63,7 +63,7 @@ public final strictfp class CustomMetada
/**
* Tests the marshalling of a metadata implemented by {@link Proxy}.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testProxy() throws JAXBException {
@@ -97,7 +97,7 @@ public final strictfp class CustomMetada
/**
* Tests that the attributes defined in subtypes are also marshalled.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*
* @see <a href="http://jira.geotoolkit.org/browse/GEOTK-108">GEOTK-108</a>
*/
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultIdentifierTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -66,7 +66,7 @@ public final strictfp class DefaultIdent
/**
* Test XML marshalling.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testMarshal() throws JAXBException {
@@ -79,7 +79,7 @@ public final strictfp class DefaultIdent
/**
* Test XML unmarshalling.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testUnmarshall() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/DefaultMetadataTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -85,8 +85,8 @@ public final strictfp class DefaultMetad
* warning occurred before this method call (i.e. each test is allowed to cause at most one warning), then
* remember the warning parameters for verification by the test method.
*
- * @param source Ignored.
- * @param warning The warning.
+ * @param source ignored.
+ * @param warning the warning.
*/
@Override
public void warningOccured(final Object source, final LogRecord warning) {
@@ -112,7 +112,7 @@ public final strictfp class DefaultMetad
* Tests unmarshalling of a metadata having a collection that contains no element.
* This was used to cause a {@code NullPointerException} prior SIS-139 fix.
*
- * @throws JAXBException If an error occurred during the during unmarshalling processes.
+ * @throws JAXBException if an error occurred during the during unmarshalling processes.
*
* @see <a href="https://issues.apache.org/jira/browse/SIS-139">SIS-139</a>
*/
@@ -328,7 +328,7 @@ public final strictfp class DefaultMetad
/**
* Tests {@link DefaultMetadata#getDataSetUri()}.
*
- * @throws URISyntaxException Should not happen.
+ * @throws URISyntaxException if the URI used in this test is malformed.
*/
@Test
@SuppressWarnings("deprecation")
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/ImmutableIdentifierTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -166,7 +166,7 @@ public final strictfp class ImmutableIde
/**
* Test XML marshalling.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testMarshal() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/CitationsTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -95,10 +95,10 @@ public final strictfp class CitationsTes
assertEquals("MapInfo", getIdentifier(MAP_INFO));
assertEquals("ISBN", getIdentifier(ISBN));
assertEquals("ISSN", getIdentifier(ISSN));
- assertEquals("Proj.4", getIdentifier(PROJ4)); // Not a valid Unicode identifier.
- assertEquals("S-57", getIdentifier(S57)); // Not a valid Unicode identifier.
- assertEquals("ISO:19115-1", getIdentifier(ISO_19115.get(0))); // The ':' separator is not usual in ISO references
- assertEquals("ISO:19115-2", getIdentifier(ISO_19115.get(1))); // and could be changed in future SIS versions.
+ assertEquals("Proj.4", getIdentifier(PROJ4)); // Not a valid Unicode identifier.
+ assertEquals("S-57", getIdentifier(S57)); // Not a valid Unicode identifier.
+ assertEquals("ISO:19115-1", getIdentifier(ISO_19115.get(0))); // The ':' separator is not usual in ISO references
+ assertEquals("ISO:19115-2", getIdentifier(ISO_19115.get(1))); // and could be changed in future SIS versions.
assertEquals("OGC:WMS", getIdentifier(WMS));
assertIdentifierEquals("OGC:06-042", null, "OGC", null, "06-042",
((List<? extends Identifier>) WMS.getIdentifiers()).get(1));
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultCitationTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -62,7 +62,7 @@ public final strictfp class DefaultCitat
/**
* Creates a citation with an arbitrary title, presentation form and other properties.
*
- * @return An arbitrary citation.
+ * @return an arbitrary citation.
*
* @since 0.7
*/
@@ -123,7 +123,7 @@ public final strictfp class DefaultCitat
@Test
public void testFreeze() {
final DefaultCitation original = create();
- final DefaultCitation clone = (DefaultCitation) original.unmodifiable(); // This will invoke 'freeze()'.
+ final DefaultCitation clone = (DefaultCitation) original.unmodifiable(); // This will invoke 'freeze()'.
assertNotSame(original, clone);
assertTrue ("original.isModifiable", original.isModifiable());
assertFalse( "clone.isModifiable", clone.isModifiable());
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/citation/DefaultContactTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -66,8 +66,8 @@ public final strictfp class DefaultConta
* warning occurred before this method call (i.e. each test is allowed to cause at most one warning), then
* remember the warning parameters for verification by the test method.
*
- * @param source Ignored.
- * @param warning The warning.
+ * @param source ignored.
+ * @param warning the warning.
*/
@Override
public void warningOccured(final Object source, final LogRecord warning) {
@@ -152,8 +152,8 @@ public final strictfp class DefaultConta
/**
* Implementation of {@link #testSetPhone()} and {@link #testSetNonSISPhone()}.
*
- * @param hideSIS Whether to hide to {@link DefaultContact} the fact that we
- * are using a SIS implementation of {@code Telephone}.
+ * @param hideSIS whether to hide to {@link DefaultContact} the fact that
+ * we are using a SIS implementation of {@code Telephone}.
*/
@SuppressWarnings("deprecation")
private void testSetPhone(final boolean hideSIS) {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/constraint/DefaultLegalConstraintsTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -67,8 +67,8 @@ public final strictfp class DefaultLegal
* warning occurred before this method call (i.e. each test is allowed to cause at most one warning), then
* remember the warning parameters for verification by the test method.
*
- * @param source Ignored.
- * @param warning The warning.
+ * @param source ignored.
+ * @param warning the warning.
*/
@Override
public void warningOccured(final Object source, final LogRecord warning) {
@@ -94,7 +94,7 @@ public final strictfp class DefaultLegal
* Tests unmarshalling of an element containing an empty {@code codeListValue} attribute.
* This was used to cause a {@code NullPointerException} prior SIS-157 fix.
*
- * @throws JAXBException If an error occurred during the during unmarshalling processes.
+ * @throws JAXBException if an error occurred during the during unmarshalling processes.
*
* @see <a href="https://issues.apache.org/jira/browse/SIS-157">SIS-157</a>
*/
@@ -126,7 +126,7 @@ public final strictfp class DefaultLegal
* The spelling changed between ISO 19115:2003 and 19115:2014, from "license" to "licence".
* We need to ensure that XML marshalling use the old spelling, until the XML schema is updated.
*
- * @throws JAXBException If an error occurred during the during unmarshalling processes.
+ * @throws JAXBException if an error occurred during the during unmarshalling processes.
*/
@Test
public void testLicenceCode() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/extent/DefaultExtentTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -48,8 +48,8 @@ public final strictfp class DefaultExten
* <li>{@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/extent"}</li>
* </ul>
*
- * @param filename The name of the XML file.
- * @return The URL to the given XML file.
+ * @param filename the name of the XML file.
+ * @return the URL to the given XML file.
*/
public static URL getResource(final String filename) {
final URL resource = DefaultExtentTest.class.getResource(filename);
@@ -64,8 +64,8 @@ public final strictfp class DefaultExten
* <p><b>XML test file:</b>
* {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/extent/Extent.xml"}</p>
*
- * @throws IOException If an error occurred while reading the XML file.
- * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.
+ * @throws IOException if an error occurred while reading the XML file.
+ * @throws JAXBException if an error occurred during the during marshalling / unmarshalling processes.
*/
@Test
public void testXML() throws IOException, JAXBException {
@@ -92,7 +92,7 @@ public final strictfp class DefaultExten
/**
* Tests XML marshalling of the {@link Extents#WORLD} constant, which is a {@code DefaultExtent} instance.
*
- * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.
+ * @throws JAXBException if an error occurred during the during marshalling / unmarshalling processes.
*
* @since 0.6
*/
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphicTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphicTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphicTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultBrowseGraphicTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -256,8 +256,10 @@ public final strictfp class DefaultBrows
public void warningOccured(final Object source, final LogRecord warning) {
assertFalse("No other warning were expected.", receivedWarning);
if (VERBOSE) {
- // In verbose mode, log the warning for allowing the developer to
- // check the message. In normal mode, the test will be silent.
+ /*
+ * In verbose mode, log the warning for allowing the developer to
+ * check the message. In normal mode, the test will be silent.
+ */
Logging.getLogger(warning.getLoggerName()).log(warning);
}
assertArrayEquals("FileName shall have precedence over CharacterString.",
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultResolutionTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -134,7 +134,7 @@ public final strictfp class DefaultResol
* <p>Annotating an other method as a workaround seems to always work. See the {@link DefaultResolution#getValue()}
* javadoc for instructions about how to check if this workaround is still needed with more recent JAXB versions.</p>
*
- * @throws JAXBException If an error occurred while marshalling the element.
+ * @throws JAXBException if an error occurred while marshalling the element.
*
* @see DefaultResolution#getValue()
*/
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentificationTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentificationTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentificationTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/identification/DefaultServiceIdentificationTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -69,7 +69,7 @@ public final strictfp class DefaultServi
/**
* Tests the marshalling of a service metadata.
*
- * @throws JAXBException If an error occurred during the during marshalling process.
+ * @throws JAXBException if an error occurred during the during marshalling process.
*/
@Test
public void testMarshal() throws JAXBException {
@@ -82,7 +82,7 @@ public final strictfp class DefaultServi
* <p><b>XML test file:</b>
* {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/service/ServiceIdentification.xml"}</p>
*
- * @throws JAXBException If an error occurred during the during unmarshalling process.
+ * @throws JAXBException if an error occurred during the during unmarshalling process.
*/
@Test
public void testUnmarshal() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultLineageTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -42,7 +42,7 @@ public final strictfp class DefaultLinea
* Tests the marshalling of an {@code "gmd:LI_Source"} element, which shall become
* {@code "gmi:LE_Source"} when some ISO 19115-2 properties are defined.
*
- * @throws JAXBException If an error occurred while marshalling the XML.
+ * @throws JAXBException if an error occurred while marshalling the XML.
*/
@Test
public void testSource() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/lineage/DefaultProcessStepTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -45,7 +45,7 @@ public final strictfp class DefaultProce
* <p><b>XML test file:</b>
* {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/lineage/ProcessStep.xml"}</p>
*
- * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.
+ * @throws JAXBException if an error occurred during the during marshalling / unmarshalling processes.
*/
@Test
public void testXML() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/metadata/iso/quality/AbstractPositionalAccuracyTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -52,7 +52,7 @@ public final strictfp class AbstractPosi
* <p><b>XML test file:</b>
* {@code "core/sis-metadata/src/test/resources/org/apache/sis/metadata/iso/quality/PositionalAccuracy.xml"}</p>
*
- * @throws JAXBException If an error occurred during the during marshalling / unmarshalling processes.
+ * @throws JAXBException if an error occurred during the during marshalling / unmarshalling processes.
*
* @see <a href="http://jira.geotoolkit.org/browse/GEOTK-107">GEOTK-107</a>
* @see FreeTextMarshallingTest
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/FreeTextMarshallingTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -54,7 +54,7 @@ public final strictfp class FreeTextMars
* The free text is wrapped inside a citation for marshalling
* purpose, but only the free text is actually tested.
*
- * @throws JAXBException If the XML in this test can not be parsed by JAXB.
+ * @throws JAXBException if the XML in this test can not be parsed by JAXB.
*/
@Test
public void testStandard() throws JAXBException {
@@ -88,7 +88,7 @@ public final strictfp class FreeTextMars
* also because it is more compact and closer to what we would expect
* inside a {@code <textGroup>} node.
*
- * @throws JAXBException If the XML in this test can not be parsed by JAXB.
+ * @throws JAXBException if the XML in this test can not be parsed by JAXB.
*/
@Test
public void testLegacy() throws JAXBException {
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/NilReasonMarshallingTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -43,7 +43,7 @@ public final strictfp class NilReasonMar
/**
* Tests a simple case for a missing data.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testMissing() throws JAXBException {
@@ -80,7 +80,7 @@ public final strictfp class NilReasonMar
* values are implemented as special cases in {@link NilReason}, because they are final classes on which
* we have no control.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
@DependsOnMethod("testMissing")
@@ -113,7 +113,7 @@ public final strictfp class NilReasonMar
* values are implemented as special cases in {@link NilReason}, because they are final classes on which
* we have no control.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
@DependsOnMethod("testMissing")
@@ -141,7 +141,7 @@ public final strictfp class NilReasonMar
/**
* Tests a missing double value.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
@DependsOnMethod("testMissing")
@@ -173,7 +173,7 @@ public final strictfp class NilReasonMar
/**
* Tests a case where the nil reason is specified by an other reason.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
@DependsOnMethod("testMissing")
@@ -208,7 +208,7 @@ public final strictfp class NilReasonMar
/**
* Tests a case where the nil reason is specified by a URI.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
@DependsOnMethod("testMissing")
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/UUIDMarshallingTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -117,7 +117,7 @@ public final strictfp class UUIDMarshall
* On an implementation note, the {@code uuid} and other attributes of the {@code <gmd:CI_Series>}
* elements are handled by {@link org.apache.sis.internal.jaxb.gco.PropertyType}.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testIdentification() throws JAXBException {
@@ -168,7 +168,7 @@ public final strictfp class UUIDMarshall
* On an implementation note, the {@code uuidref}, {@code xlink:href} and other attributes of the
* {@code <gmd:series>} element are handled by {@link org.apache.sis.internal.jaxb.gco.PropertyType}.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
public void testReference() throws JAXBException {
@@ -200,7 +200,7 @@ public final strictfp class UUIDMarshall
* The same test than {@link #testReference()}, except that the {@code <gmd:CI_Series>} element is empty.
* This situation shall force the creation of a new, empty, element for storing the {@code uuidref} information.
*
- * @throws JAXBException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
*/
@Test
@DependsOnMethod("testReference")
Modified: sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-metadata/src/test/java/org/apache/sis/xml/XLinkMarshallingTest.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -73,8 +73,8 @@ public final strictfp class XLinkMarshal
/**
* Verifies if the given metadata contains the expected {@code xlink:href} attribute value.
*
- * @param isNilExpected {@code true} if the identification info is expected to be a {@link NilObject} instance.
- * @param metadata The metadata to verify.
+ * @param isNilExpected {@code true} if the identification info is expected to be a {@link NilObject} instance.
+ * @param metadata the metadata to verify.
*/
private static void verify(final boolean isNilExpected, final DefaultMetadata metadata) {
final Identification identification = getSingleton(metadata.getIdentificationInfo());
@@ -94,8 +94,8 @@ public final strictfp class XLinkMarshal
* </gmd:MD_Metadata>
* }
*
- * @throws JAXBException Should never happen.
- * @throws URISyntaxException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
+ * @throws URISyntaxException if the URI used in this test is malformed.
*/
@Test
public void testLinkOnly() throws JAXBException, URISyntaxException {
@@ -126,8 +126,8 @@ public final strictfp class XLinkMarshal
* </gmd:MD_Metadata>
* }
*
- * @throws JAXBException Should never happen.
- * @throws URISyntaxException Should never happen.
+ * @throws JAXBException if an error occurred during (un)marshalling.
+ * @throws URISyntaxException if the URI used in this test is malformed.
*/
@Test
public void testWithElement() throws JAXBException, URISyntaxException {
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/internal/util/CollectionsExt.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -22,6 +22,7 @@ import org.opengis.util.CodeList;
import org.apache.sis.util.Static;
import org.apache.sis.util.Numbers;
import org.apache.sis.util.collection.CodeListSet;
+import org.apache.sis.util.collection.CheckedContainer;
import org.apache.sis.util.resources.Errors;
import org.opengis.parameter.InvalidParameterCardinalityException;
@@ -414,6 +415,65 @@ public final class CollectionsExt extend
}
/**
+ * Returns a unmodifiable version of the given collection.
+ * If the given collection is a {@link Set}�or a {@link List}, then this method tries to
+ * return a collection of the same type. Other types are not guaranteed to be preserved.
+ *
+ * <p><em>The collection returned by this method may or may not be a view of the given collection</em>.
+ * Consequently this method shall be used <strong>only</strong> if the given collection will
+ * <strong>not</strong> be modified after this method call. In case of doubt, use the
+ * standard {@link Collections#unmodifiableCollection(Collection)} method instead.</p>
+ *
+ * @param <E> the type of elements in the collection.
+ * @param collection the collection to make unmodifiable, or {@code null}.
+ * @return a unmodifiable version of the given collection, or {@code null} if the given collection was null.
+ *
+ * @since 0.8
+ */
+ public static <E> Collection<E> unmodifiableOrCopy(Collection<E> collection) {
+ if (collection != null) {
+ if (collection instanceof Set<?>) {
+ return unmodifiableOrCopy((Set<E>) collection);
+ }
+ final int length = collection.size();
+ switch (length) {
+ case 0: {
+ collection = Collections.emptyList();
+ break;
+ }
+ case 1: {
+ collection = Collections.singletonList(collection.iterator().next());
+ break;
+ }
+ default: {
+ if (collection instanceof UnmodifiableArrayList<?>) {
+ break; // List is already unmodifiable.
+ }
+ if (collection instanceof CheckedContainer<?>) {
+ /*
+ * We use UnmodifiableArrayList for avoiding one level of indirection. The fact that it
+ * implements CheckedContainer is not a goal here, and is actually unsafe since we have
+ * no guarantee (except Javadoc contract) that the <E> in CheckedContainer<E> is really
+ * the same than in Collection<E>. We tolerate this hole for now because we documented
+ * the restriction in CheckedContainer javadoc, but future version may replace this block
+ * by JDK9 collections.
+ */
+ @SuppressWarnings("unchecked") // Okay if collection is compliant with CheckedContainer contract.
+ final E[] array = (E[]) Array.newInstance(((CheckedContainer<E>) collection).getElementType(), length);
+ collection = UnmodifiableArrayList.wrap(collection.toArray(array));
+ } else if (collection instanceof List<?>) {
+ collection = Collections.unmodifiableList((List<E>) collection);
+ } else {
+ collection = Collections.unmodifiableCollection(collection);
+ }
+ break;
+ }
+ }
+ }
+ return collection;
+ }
+
+ /**
* Copies the content of the given collection to a new, unsynchronized, modifiable, in-memory
* collection. The implementation class of the returned collection may be different than the
* class of the collection given in argument. The following table gives the types mapping
@@ -519,7 +579,7 @@ public final class CollectionsExt extend
* Returns a more compact representation of the given map. This method is similar to
* {@link #unmodifiableOrCopy(Map)} except that it does not wrap the map in an unmodifiable
* view. The intend is to avoid one level of indirection for performance and memory reasons.
- * This is okay only if the map is kept in a private field and never escape outside this class.
+ * This is okay only if the map is kept in a private field and never escape outside that class.
*
* @param <K> the type of keys in the map.
* @param <V> the type of values in the map.
Modified: sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java?rev=1779555&r1=1779554&r2=1779555&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedContainer.java [UTF-8] Fri Jan 20 03:49:52 2017
@@ -23,6 +23,14 @@ import java.util.Collection;
* A container that ensures that all elements are assignable to a given base type.
* Checked containers are usually {@link Collection}, but not always.
*
+ * <p><b>Constraint:</b>
+ * if a class implements both {@code CheckedContainer} and {@code Collection},
+ * then the parameterized type shall be the same type. Example:</p>
+ *
+ * {@preformat java
+ * class MyList<E> extends AbstractList<E> implements CheckedContainer<E> { ... }
+ * }
+ *
* @param <E> the base type of elements in the container.
*
* @author Martin Desruisseaux (IRD, Geomatys)