From commits-return-3379-apmail-sis-commits-archive=sis.apache.org@sis.apache.org Thu Jan 2 06:09:59 2014
Return-Path:
X-Original-To: apmail-sis-commits-archive@www.apache.org
Delivered-To: apmail-sis-commits-archive@www.apache.org
Received: from mail.apache.org (hermes.apache.org [140.211.11.3])
by minotaur.apache.org (Postfix) with SMTP id C0FD9101D7
for ; Thu, 2 Jan 2014 06:09:59 +0000 (UTC)
Received: (qmail 29460 invoked by uid 500); 2 Jan 2014 06:09:44 -0000
Delivered-To: apmail-sis-commits-archive@sis.apache.org
Received: (qmail 29409 invoked by uid 500); 2 Jan 2014 06:09:41 -0000
Mailing-List: contact commits-help@sis.apache.org; run by ezmlm
Precedence: bulk
List-Help:
List-Unsubscribe:
List-Post:
List-Id:
Reply-To: sis-dev@sis.apache.org
Delivered-To: mailing list commits@sis.apache.org
Received: (qmail 29350 invoked by uid 99); 2 Jan 2014 06:09:34 -0000
Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 06:09:34 +0000
X-ASF-Spam-Status: No, hits=-2000.0 required=5.0
tests=ALL_TRUSTED
X-Spam-Check-By: apache.org
Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4)
by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Jan 2014 06:09:19 +0000
Received: from eris.apache.org (localhost [127.0.0.1])
by eris.apache.org (Postfix) with ESMTP id 0C7E923889E3;
Thu, 2 Jan 2014 06:08:56 +0000 (UTC)
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Subject: svn commit: r1554743 [3/4] - in /sis/trunk: ./
core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/code/
core/sis-metadata/src/main/java/org/apache/sis/internal/jaxb/gml/
core/sis-metadata/src/main/java/org/apache/sis/metadata/ core/sis-metada...
Date: Thu, 02 Jan 2014 06:08:50 -0000
To: commits@sis.apache.org
From: desruisseaux@apache.org
X-Mailer: svnmailer-1.0.9
Message-Id: <20140102060856.0C7E923889E3@eris.apache.org>
X-Virus-Checked: Checked by ClamAV on apache.org
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ArraysExt.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -35,7 +35,7 @@ import org.apache.sis.internal.jdk7.Obje
* {@code null} arrays and do not copy anything if the given array already has the
* requested length.
* The {@link #insert(Object[], int, Object[], int, int) insert} and {@link #remove(Object[],
- * int, int) remove} methods for adding and removing elements in the middle of an array.
+ * int, int) remove} methods for adding and removing elements in the middle of an array.
* The {@link #isSorted(Object[], Comparator, boolean) isSorted} methods for verifying
* if an array is sorted, strictly or not.
*
@@ -136,12 +136,12 @@ public final class ArraysExt extends Sta
*
* - If the given {@code length} is longer than the length of the given {@code array},
* then the returned array will contain all the elements of {@code array} at index
- * i {@literal <} {@code array.length}. Elements at index
- * i {@literal >=} {@code array.length} are initialized to {@code null}.
+ * i {@literal <} {@code array.length}. Elements at index
+ * i {@literal >=} {@code array.length} are initialized to {@code null}.
*
* - If the given {@code length} is shorter than the length of the given {@code array},
* then the returned array will contain only the elements of {@code array} at index
- * i {@literal <} {@code length}. Remaining elements are not copied.
+ * i {@literal <} {@code length}. Remaining elements are not copied.
*
* - If the given {@code length} is equal to the length of the given {@code array},
* then {@code array} is returned unchanged. No copy is performed.
@@ -149,7 +149,7 @@ public final class ArraysExt extends Sta
*
*
* Note that if the given array is {@code null}, then this method unconditionally returns
- * {@code null} no matter the value of the {@code length} argument.
+ * {@code null} no matter the value of the {@code length} argument.
*
* @param The array elements.
* @param array Array to resize, or {@code null}.
@@ -384,7 +384,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array.
* In every cases, the given array is never modified.
*
@@ -396,7 +396,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*/
private static T doRemove(final T array, final int first, final int length)
throws NullArgumentException, IllegalArgumentException, IndexOutOfBoundsException
@@ -418,7 +418,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns
+ *
If the {@code length} argument is 0, then this method returns
* the {@code array} reference unchanged (except if empty). Otherwise this method
* creates a new array. In every cases, the given array is never modified.
*
@@ -430,7 +430,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(Object[], int, int)
*/
@@ -444,7 +444,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_DOUBLE empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -455,7 +455,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(double[], int, int)
*/
@@ -470,7 +470,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_FLOAT empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -481,7 +481,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(float[], int, int)
*/
@@ -496,7 +496,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_LONG empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -507,7 +507,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(long[], int, int)
*/
@@ -522,7 +522,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_INT empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -533,7 +533,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(int[], int, int)
*/
@@ -548,7 +548,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_SHORT empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -559,7 +559,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(short[], int, int)
*/
@@ -574,7 +574,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_BYTE empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -585,7 +585,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(byte[], int, int)
*/
@@ -600,7 +600,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_CHAR empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -611,7 +611,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(char[], int, int)
*/
@@ -626,7 +626,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array except for
* the given range.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged, except for {@linkplain #EMPTY_BOOLEAN empty} arrays. Otherwise
* this method creates a new array. In every cases, the given array is never modified.
*
@@ -637,7 +637,7 @@ public final class ArraysExt extends Sta
* removed elements, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(boolean[], int, int)
*/
@@ -652,7 +652,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of {@code null} elements.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -665,7 +665,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*/
private static T doInsert(final T array, final int first, final int length)
throws NullArgumentException, IllegalArgumentException, IndexOutOfBoundsException
@@ -687,7 +687,7 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with additional
* "spaces" in the given range. These "spaces" will be made up of {@code null} elements.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -700,7 +700,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(Object[], int, Object[], int, int)
* @see #remove(Object[], int, int)
@@ -716,7 +716,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -728,7 +728,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(double[], int, double[], int, int)
* @see #remove(double[], int, int)
@@ -744,7 +744,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -756,7 +756,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(float[], int, float[], int, int)
* @see #remove(float[], int, int)
@@ -772,7 +772,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -784,7 +784,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(long[], int, long[], int, int)
* @see #remove(long[], int, int)
@@ -800,7 +800,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -812,7 +812,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(int[], int, int[], int, int)
* @see #remove(int[], int, int)
@@ -828,7 +828,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -840,7 +840,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(short[], int, short[], int, int)
* @see #remove(short[], int, int)
@@ -856,7 +856,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -868,7 +868,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(byte[], int, byte[], int, int)
* @see #remove(byte[], int, int)
@@ -884,7 +884,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to zero.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -896,7 +896,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(char[], int, char[], int, int)
* @see #remove(char[], int, int)
@@ -912,7 +912,7 @@ public final class ArraysExt extends Sta
* "spaces" in the given range. These "spaces" will be made up of elements initialized
* to {@code false}.
*
- * If the {@code length} argument is 0, then this method returns the {@code array}
+ *
If the {@code length} argument is 0, then this method returns the {@code array}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given array is never modified.
*
@@ -924,7 +924,7 @@ public final class ArraysExt extends Sta
* inserted, or {@code array} (which may be null) if {@code length} is 0.
* @throws NullArgumentException If {@code array} is null and {@code length} is different than 0.
* @throws IllegalArgumentException If {@code length} is negative.
- * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
+ * @throws IndexOutOfBoundsException If {@code first} or {@code first+length} is out of array bounds.
*
* @see #insert(boolean[], int, boolean[], int, int)
* @see #remove(boolean[], int, int)
@@ -939,16 +939,16 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param The arrays type.
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -983,16 +983,16 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param The type of array elements.
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1018,15 +1018,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1052,15 +1052,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1086,15 +1086,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1120,15 +1120,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1154,15 +1154,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1188,15 +1188,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1222,15 +1222,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1256,15 +1256,15 @@ public final class ArraysExt extends Sta
* Returns an array containing the same elements than the given array, with the content
* of an other array inserted at the given index.
*
- * If the {@code length} argument is 0, then this method returns the {@code dst}
+ *
If the {@code length} argument is 0, then this method returns the {@code dst}
* reference unchanged. Otherwise this method creates a new array. In every cases,
* the given arrays are never modified.
*
* @param src Array to entirely or partially insert into {@code dst}.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param srcOff Index of the first element of {@code src} to insert into {@code dst}.
* @param dst Array in which to insert {@code src} data.
- * Can be null only if {@code length} is 0.
+ * Can be null only if {@code length} is 0.
* @param dstOff Index of the first element in {@code dst} where to insert {@code src} data.
* All elements of {@code dst} whose index is equal to or greater than
* {@code dstOff} will be moved forward.
@@ -1331,7 +1331,7 @@ public final class ArraysExt extends Sta
*
* @param array Array from which to remove duplicated elements, or {@code null}.
* @return The number of remaining elements in the given array, or 0 if the given
- * {@code array} was null.
+ * {@code array} was null.
*/
public static int removeDuplicated(final Object[] array) {
if (array == null) {
@@ -2030,7 +2030,7 @@ public final class ArraysExt extends Sta
*
*
* - If the {@code arrays} argument is {@code null} or contains only {@code null}
- * elements, then this method returns {@code null}.
+ * elements, then this method returns {@code null}.
* - Otherwise if the {@code arrays} argument contains exactly one non-null array with
* a length greater than zero, then that array is returned. It is not copied.
* - Otherwise a new array with a length equals to the sum of the length of every
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/CharSequences.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -278,7 +278,7 @@ public final class CharSequences extends
*
* @param text The character sequence to count occurrences, or {@code null}.
* @param toSearch The character to count.
- * @return The number of occurrences of the given character, or 0 if the {@code text} is null.
+ * @return The number of occurrences of the given character, or 0 if the {@code text} is null.
*/
public static int count(final CharSequence text, final char toSearch) {
int n = 0;
@@ -546,7 +546,7 @@ search: for (; fromIndex <= toIndex;
*
- If the given range contains only space characters and the character at {@code toIndex-1}
* is the high surrogate of a valid supplementary code point, then this method returns
* {@code toIndex+1}, which is the index of the next code point.
- * - If {@code fromIndex} is negative or {@code toIndex} is greater than the text length,
+ *
- If {@code fromIndex} is negative or {@code toIndex} is greater than the text length,
* then the behavior of this method is undefined.
*
*
@@ -583,7 +583,7 @@ search: for (; fromIndex <= toIndex;
* If the given range contains only space characters and the character at {@code fromIndex}
* is the low surrogate of a valid supplementary code point, then this method returns
* {@code fromIndex-1}, which is the index of the code point.
- * If {@code fromIndex} is negative or {@code toIndex} is greater than the text length,
+ * If {@code fromIndex} is negative or {@code toIndex} is greater than the text length,
* then the behavior of this method is undefined.
*
*
@@ -958,7 +958,7 @@ search: for (; fromIndex <= toIndex;
*
* @param text The text to scan for Unicode characters to replace by ASCII characters,
* or {@code null}.
- * @return The given text with substitutions applied, or {@code text} if no replacement
+ * @return The given text with substitutions applied, or {@code text} if no replacement
* has been applied, or {@code null} if the given text was null.
*
* @see StringBuilders#toASCII(StringBuilder)
@@ -1027,7 +1027,7 @@ search: for (; fromIndex <= toIndex;
* @param lower Index of the first character to consider for inclusion in the sub-sequence.
* @param upper Index after the last character to consider for inclusion in the sub-sequence.
* @return A characters sequence with leading and trailing white spaces removed, or {@code null}
- * if the {@code text} argument is null.
+ * if the {@code text} argument is null.
* @throws IndexOutOfBoundsException If {@code lower} or {@code upper} is out of bounds.
*/
public static CharSequence trimWhitespaces(CharSequence text, int lower, int upper) {
@@ -1935,7 +1935,7 @@ cmp: while (ia < lga) {
*
* @param text The text for which to get the token.
* @param fromIndex Index of the fist character to consider in the given text.
- * @return A sub-sequence of {@code text} starting at the given offset, or an empty string
+ * @return A sub-sequence of {@code text} starting at the given offset, or an empty string
* if there is no non-blank character at or after the given offset.
* @throws NullPointerException if the {@code text} argument is null.
*/
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Classes.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -80,7 +80,7 @@ public final class Classes extends Stati
/**
* Changes the array dimension by the given amount. The given class can be a primitive type,
- * a Java object, or an array of the above. If the given {@code dimension} is positive, then
+ * a Java object, or an array of the above. If the given {@code dimension} is positive, then
* the array dimension will be increased by that amount. For example a change of dimension 1
* will change a {@code int} class into {@code int[]}, and a {@code String[]} class into
* {@code String[][]}. A change of dimension 2 is like applying a change of dimension 1 two
@@ -293,7 +293,7 @@ public final class Classes extends Stati
*
* - Consistency with other methods ({@link #getLeafInterfaces(Class, Class)},
* {@link Class#getInterfaces()}).
- * - Because arrays in Java are covariant, while the {@code Set} are not.
+ *
- Because arrays in Java are covariant, while the {@code Set} are not.
* Consequently callers can cast {@code Class super T>[]} to {@code Class>[]}
* while they can not cast {@code Set>} to {@code Set>}.
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Emptiable.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -42,7 +42,7 @@ package org.apache.sis.util;
*/
public interface Emptiable {
/**
- * Returns {@code true} if this instance is empty. The definition of "emptiness" may vary between implementations.
+ * Returns {@code true} if this instance is empty. The definition of "emptiness" may vary between implementations.
* For example {@link org.apache.sis.metadata.iso.extent.DefaultGeographicBoundingBox#isEmpty()} returns {@code true}
* if all values are {@code NaN} (i.e. uninitialized) while {@link org.apache.sis.geometry.AbstractEnvelope#isEmpty()}
* returns {@code true} if the geometric surface is zero.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/LenientComparable.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -127,7 +127,7 @@ public interface LenientComparable {
* Note that {@code this.equals(other, mode)} is not guaranteed to be equal
* to {@code other.equals(this, mode)}. In particular, the {@code BY_CONTRACT} level and all
* levels below it will typically compare only the properties known to {@code this} instance,
- * ignoring any properties that may be known only by the {@code other} instance.
+ * ignoring any properties that may be known only by the {@code other} instance.
*
* @param other The object to compare to {@code this}.
* @param mode The strictness level of the comparison.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -44,7 +44,7 @@ import static java.lang.Double.doubleToL
*/
public final class Numbers extends Static {
/**
- * Constant of value {@value} used in {@code switch} statements or as index in arrays.
+ * Constant of value {@value} used in {@code switch} statements or as index in arrays.
*/
public static final byte
BIG_DECIMAL=10, BIG_INTEGER=9,
@@ -545,7 +545,7 @@ public final class Numbers extends Stati
* The given type shall be one of {@link Byte}, {@link Short}, {@link Integer}, {@link Long},
* {@link Float}, {@link Double}, {@link BigInteger} and {@link BigDecimal} classes.
* Furthermore, the given value shall be convertible to the given class without precision lost,
- * otherwise an {@link IllegalArgumentException} will be thrown.
+ * otherwise an {@link IllegalArgumentException} will be thrown.
*
* @param The wrapper class.
* @param value The value to wrap.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/ObjectConverter.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -31,7 +31,7 @@ import org.apache.sis.internal.jdk8.Func
* The main method of this interface is {@link #apply(Object)}, which receives an object of type
* S and returns an object of type T. The set of all S values for which
* {@code apply(S)} does not throw {@link UnconvertibleObjectException} is called the domain
- * of this function, regardless of whether the T result is {@code null} or not.
+ * of this function, regardless of whether the T result is {@code null} or not.
*
* {@section Function properties}
* Some characteristics about the S to T mapping are given by the
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/StringBuilders.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -172,7 +172,7 @@ public final class StringBuilders extend
* been appended to the buffer}, in order to make it appears like an integer when possible.
*
* @param buffer The buffer to trim if possible.
- * @throws NullArgumentException If the given {@code buffer} is null.
+ * @throws NullArgumentException If the given {@code buffer} is null.
*
* @see CharSequences#trimFractionalPart(CharSequence)
*/
@@ -198,7 +198,7 @@ public final class StringBuilders extend
* to {@code 00FF}, inclusive. Other characters are left unchanged.
*
* @param buffer The text to scan for Unicode characters to replace by ASCII characters.
- * @throws NullArgumentException If the given {@code buffer} is null.
+ * @throws NullArgumentException If the given {@code buffer} is null.
*
* @see CharSequences#toASCII(CharSequence)
*/
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/Cache.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -895,7 +895,7 @@ public class Cache extends Abstract
* values to their callers.
*
* This property can also be set in order to allow some recursivity. If during the creation
- * of an object, the program asks to this {@code Cache} for the same object (using the same key),
+ * of an object, the program asks to this {@code Cache} for the same object (using the same key),
* then the default {@code Cache} implementation will consider this situation as a key collision
* unless this property has been set to {@code true}.
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/DefaultTreeTable.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -97,7 +97,7 @@ public class DefaultTreeTable implements
/**
* The index of values associated to each column. This is used by the {@link Node}
* implementation for storing values in a single flat array. After creation, this
- * map shall be read-only since many {@code Node} instances may share it.
+ * map shall be read-only since many {@code Node} instances may share it.
*
* {@note This field and the {@link #columns} field could be computed from each other.
* But we serialize this field anyway because children nodes will typically hold
@@ -390,7 +390,7 @@ public class DefaultTreeTable implements
* {@link #getValue(TableColumn)} and {@link #setValue(TableColumn, Object)}
* methods for identifying the index where to store values in the {@link #values} array.
*
- * This map shall be read-only since many {@code Node} instances may share it.
+ * This map shall be read-only since many {@code Node} instances may share it.
*
* @see DefaultTreeTable#columnIndices
*/
@@ -563,7 +563,7 @@ public class DefaultTreeTable implements
}
/**
- * Returns the value in the given column, or {@code null} if none.
+ * Returns the value in the given column, or {@code null} if none.
*
* @param The base type of values in the given column.
* @param column Identifier of the column from which to get the value.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeNodeList.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeNodeList.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeNodeList.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeNodeList.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -117,7 +117,7 @@ abstract class TreeNodeList extends Abst
/**
* Sets or clears the parent of the given node. This method doesn't need to care about the
- * current node parent, since {@code TreeNodeList} will take care of removing the tree node
+ * current node parent, since {@code TreeNodeList} will take care of removing the tree node
* from its previous parent before to invoke this method.
*
* The {@code mode} argument specifies the parent value to set, as one of the following
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTable.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -71,7 +71,7 @@ public interface TreeTable {
/**
* Returns the table columns, in the order they shall be rendered by default.
* This method returns the union of all table columns in every nodes of this
- * tree. However any {@link Node} instance can return {@code null} for a
+ * tree. However any {@link Node} instance can return {@code null} for a
* particular column if the node doesn't have that column.
*
* @return The union of all table columns in every tree node.
@@ -179,7 +179,7 @@ public interface TreeTable {
Node newChild() throws UnsupportedOperationException;
/**
- * Returns the value in the given column, or {@code null} if none.
+ * Returns the value in the given column, or {@code null} if none.
*
* @param The base type of values in the given column.
* @param column Identifier of the column from which to get the value.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTableFormat.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -49,7 +49,7 @@ import static org.apache.sis.util.Charac
* A parser and formatter for {@link TreeTable} instances.
* This formatter is given an arbitrary number of {@link TableColumn}s
* to use during the formatting. The first column is taken as the node label.
- * If a {@code TreeTable} is formatted with only that column,
+ * If a {@code TreeTable} is formatted with only that column,
* then the {@link String} result is like the following example:
*
* {@preformat text
@@ -59,7 +59,7 @@ import static org.apache.sis.util.Charac
* └─Node #3
* }
*
- * If the same {@code TreeTable} is formatted with two columns,
+ * If the same {@code TreeTable} is formatted with two columns,
* then the {@link String} result is like the following example:
*
* {@preformat text
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/collection/TreeTables.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -66,7 +66,7 @@ import org.apache.sis.util.ArgumentCheck
* There is no pre-defined method for this task because there is too many parameters that
* developers may want to customize (columns to merge, conditions for accepting the merge,
* kind of objects to merge, name separator, etc.). In the following code snippet,
- * the content of the {@code NAME} columns are concatenated only if the {@code VALUE} column
+ * the content of the {@code NAME} columns are concatenated only if the {@code VALUE} column
* has no value (for avoiding data lost when the node is discarded) and use the system file
* separator as name separator:
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/util/iso/package-info.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -17,7 +17,7 @@
/**
* Implementations of GeoAPI types from the {@link org.opengis.util} package.
- * {@code InternationalString} implementations are closely related to the {@code }
+ * {@code InternationalString} implementations are closely related to the {@code }
* XML element found in ISO specifications. All other non-static types except the {@code Factory}
* implementations are derived from the ISO 19103 specification.
* The main content of this package are:
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierMap.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierMap.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierMap.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierMap.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -28,7 +28,7 @@ import org.opengis.metadata.citation.Cit
* identifier authority} and the {@linkplain java.util.Map.Entry#getValue() value} is the
* {@linkplain Identifier#getCode() identifier code}.
*
- * Some XML identifiers are difficult to handle as {@link Identifier} objects. Those identifiers are
+ *
Some XML identifiers are difficult to handle as {@link Identifier} objects. Those identifiers are
* rather handled using specialized classes like {@link XLink}. This {@code IdentifierMap} interface
* mirrors the standard {@link Map#get(Object) get} and {@link Map#put(Object, Object) put} methods
* with specialized methods, in order to fetch and store identifiers as objects of the specialized
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierSpace.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierSpace.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierSpace.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/IdentifierSpace.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -99,7 +99,7 @@ public interface IdentifierSpace exte
/**
* Any XML attributes defined by OGC in the
* xlink schema.
- * Note that the above {@link #HREF} identifier space is a special case of this
+ * Note that the above {@link #HREF} identifier space is a special case of this
* {@code xlink} identifier space.
*
* @see XLink
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/NilObject.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -29,7 +29,7 @@ package org.apache.sis.xml;
*
* Nil objects appear most frequently in XML documents since if a mandatory ISO 19115 attribute
* is absent, then the ISO 19139 standard requires us to said why it is so. The following example
- * shows a {@code CI_Citation} fragment with an ordinary {@code CI_Series} element on the left side,
+ * shows a {@code CI_Citation} fragment with an ordinary {@code CI_Series} element on the left side,
* and an unknown {@code CI_Series} element on the right side:
*
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/Pooled.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -450,14 +450,14 @@ abstract class Pooled {
/**
* Sets the given property to the wrapped (un)marshaller. This method is invoked
* automatically when the property given to the {@link #setProperty(String, Object)}
- * method was not one of the {@link XML} constants.
+ * method was not one of the {@link XML} constants.
*/
abstract void setStandardProperty(String name, Object value) throws PropertyException;
/**
* Gets the given property from the wrapped (un)marshaller. This method is invoked
* automatically when the property key given to the {@link #getProperty(String)}
- * method was not one of the {@link XML} constants.
+ * method was not one of the {@link XML} constants.
*/
abstract Object getStandardProperty(String name) throws PropertyException;
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XLink.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -232,7 +232,7 @@ public class XLink implements Serializab
/**
* A pointer to an external resource. Allows the {@link XLink#getHRef() href},
* {@link XLink#getRole() role}, {@link #getTitle() title} and {@link XLink#getLabel()
- * label} attributes, where {@code href} is mandatory and all other are optional.
+ * label} attributes, where {@code href} is mandatory and all other are optional.
*/
@XmlEnumValue("locator")
LOCATOR(0x1 | 0x2 | 0x4 | 0x10 | 0x80, 0x1 | 0x2),
@@ -374,9 +374,9 @@ public class XLink implements Serializab
/**
* Sets the type of link. Any value different than {@link org.apache.sis.xml.XLink.Type#AUTO
* Type.AUTO} (including {@code null}) will overwrite the value inferred automatically by
- * {@link #getType()}. A {@code AUTO} value will enable automatic type detection.
+ * {@link #getType()}. A {@code AUTO} value will enable automatic type detection.
*
- * @param type The new type of link, or {@code null} if none.
+ * @param type The new type of link, or {@code null} if none.
*/
public void setType(final Type type) {
canWrite(0x1, "type", "type"); // We want a non-null value in all cases.
@@ -421,7 +421,7 @@ public class XLink implements Serializab
* attribute allows an XML element to refer to another XML element that has
* a corresponding id
attribute.}
*
- * @return A URN to a resources, or {@code null} if none.
+ * @return A URN to a resources, or {@code null} if none.
*
* @category locator
*/
@@ -433,7 +433,7 @@ public class XLink implements Serializab
/**
* Sets the URN to a resources.
*
- * @param href A URN to a resources, or {@code null} if none.
+ * @param href A URN to a resources, or {@code null} if none.
* @throws UnsupportedOperationException If this {@code xlink} is unmodifiable.
* @throws IllegalStateException If the link type {@linkplain #setType has been explicitely set}.
* and that type does not allow the {@code "href"} attribute.
@@ -448,7 +448,7 @@ public class XLink implements Serializab
/**
* Returns a URI reference for some description of the arc role.
*
- * @return A URI reference for some description of the arc role, or {@code null} if none.
+ * @return A URI reference for some description of the arc role, or {@code null} if none.
*
* @category semantic
*/
@@ -460,7 +460,7 @@ public class XLink implements Serializab
/**
* Sets the URI reference for some description of the arc role.
*
- * @param role A URI reference for some description of the arc role, or {@code null} if none.
+ * @param role A URI reference for some description of the arc role, or {@code null} if none.
* @throws UnsupportedOperationException If this {@code xlink} is unmodifiable.
* @throws IllegalStateException If the link type {@linkplain #setType has been explicitely set}.
* and that type does not allow the {@code "role"} attribute.
@@ -475,7 +475,7 @@ public class XLink implements Serializab
/**
* Returns a URI reference for some description of the arc role.
*
- * @return A URI reference for some description of the arc role, or {@code null} if none.
+ * @return A URI reference for some description of the arc role, or {@code null} if none.
*
* @category semantic
*/
@@ -487,7 +487,7 @@ public class XLink implements Serializab
/**
* Sets a URI reference for some description of the arc role.
*
- * @param arcrole A URI reference for some description of the arc role, or {@code null} if none.
+ * @param arcrole A URI reference for some description of the arc role, or {@code null} if none.
* @throws UnsupportedOperationException If this {@code xlink} is unmodifiable.
* @throws IllegalStateException If the link type {@linkplain #setType has been explicitely set}.
* and that type does not allow the {@code "arcrole"} attribute.
@@ -502,7 +502,7 @@ public class XLink implements Serializab
/**
* Returns a human-readable string with a short description for the arc.
*
- * @return A human-readable string with a short description for the arc, or {@code null} if none.
+ * @return A human-readable string with a short description for the arc, or {@code null} if none.
*
* @category semantic
*/
@@ -515,7 +515,7 @@ public class XLink implements Serializab
* Sets a human-readable string with a short description for the arc.
*
* @param title A human-readable string with a short description for the arc,
- * or {@code null} if none.
+ * or {@code null} if none.
* @throws UnsupportedOperationException If this {@code xlink} is unmodifiable.
* @throws IllegalStateException If the link type {@linkplain #setType has been explicitely set}.
* and that type does not allow the {@code "title"} attribute.
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/XML.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -194,7 +194,7 @@ public final class XML extends Static {
* string is not valid), the default behavior is to throw an exception which cause the
* (un)marshalling of the entire document to fail. This default behavior can be customized by
* invoking {@link Marshaller#setProperty(String, Object)} with this {@code CONVERTER} property
- * key and a custom {@link ValueConverter} instance. {@code ValueConverter} can also be used
+ * key and a custom {@link ValueConverter} instance. {@code ValueConverter} can also be used
* for replacing an erroneous URL by a fixed URL. See the {@link ValueConverter} javadoc for
* more details.
*
Modified: sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/package-info.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/package-info.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/package-info.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/main/java/org/apache/sis/xml/package-info.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -43,7 +43,7 @@
*
* {@section Customizing the XML}
* In order to parse and format ISO 19139 compliant documents, SIS needs its own
- * {@link javax.xml.bind.Marshaller} and {@link javax.xml.bind.Unmarshaller} instances
+ * {@link javax.xml.bind.Marshaller} and {@link javax.xml.bind.Unmarshaller} instances
* (which are actually wrappers around standard instances). Those instances are created
* and cached by {@link org.apache.sis.xml.MarshallerPool}, which is used internally by
* the above-cited {@code XML} class. However developers can instantiate their own
Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsFormatTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsFormatTest.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsFormatTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/math/StatisticsFormatTest.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -35,7 +35,7 @@ import static org.apache.sis.test.Assert
public final strictfp class StatisticsFormatTest extends TestCase {
/**
* Tests the formatting of {@code Statistics} without column headers.
- * We instantiate the {@link StatisticsFormat} directly in order to fix the locale
+ * We instantiate the {@link StatisticsFormat} directly in order to fix the locale
* to a hard-coded value. But except for the localization, the result should be
* nearly identical to a call to the {@link Statistics#toString()} method.
*/
Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/FormattedCharacterIteratorTest.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/FormattedCharacterIteratorTest.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/FormattedCharacterIteratorTest.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/measure/FormattedCharacterIteratorTest.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -109,7 +109,7 @@ public final strictfp class FormattedCha
/**
* Returns all expected attribute keys for the tests in this class.
*
- * @param withNumberFields {@code true} for including the keys for {@code NumberFormat} fields.
+ * @param withNumberFields {@code true} for including the keys for {@code NumberFormat} fields.
*/
private static Set getAllAttributeKeys(final boolean withNumberFields) {
final Set keys = new HashSet(8);
Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/Assert.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -29,7 +29,6 @@ import java.io.ByteArrayOutputStream;
import javax.swing.tree.TreeNode;
import javax.xml.parsers.ParserConfigurationException;
import org.xml.sax.SAXException;
-import org.opengis.referencing.operation.Matrix;
import org.apache.sis.util.Utilities;
import org.apache.sis.util.CharSequences;
import org.apache.sis.util.ComparisonMode;
@@ -46,7 +45,7 @@ import org.apache.sis.internal.jdk7.Obje
* @version 0.3
* @module
*/
-public strictfp class Assert extends org.opengis.test.Assert {
+public strictfp class Assert extends GeoapiAssert {
/**
* For subclass constructor only.
*/
@@ -54,33 +53,6 @@ public strictfp class Assert extends org
}
/**
- * Asserts that the given matrix is equals to the expected one, up to the given tolerance value.
- *
- * @param message Header of the exception message in case of failure, or {@code null} if none.
- * @param expected The expected matrix.
- * @param actual The matrix to compare.
- * @param tolerance The tolerance threshold.
- */
- public static void assertMatrixEquals(final String message, final Matrix expected, final Matrix actual, final double tolerance) {
- if (TestCase.PENDING_NEXT_GEOAPI_RELEASE) {
- // TODO: Remove this method, so we inherit the GeoAPI one instead.
- }
- final int numRow = actual.getNumRow();
- final int numCol = actual.getNumCol();
- assertEquals("numRow", expected.getNumRow(), numRow);
- assertEquals("numCol", expected.getNumCol(), numCol);
- for (int j=0; j
*
* {@code XMLComparator} is namespace aware. The second case in the above-cited choice may happen only
- * if the user provided {@link Node} instances to the constructor. In such case, {@code XMLComparator} has
+ * if the user provided {@link Node} instances to the constructor. In such case, {@code XMLComparator} has
* no control on whether the nodes contain namespaces or not.
*
* For example in order to ignore the namespace, type and schema location declaration,
Modified: sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java
URL: http://svn.apache.org/viewvc/sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java?rev=1554743&r1=1554742&r2=1554743&view=diff
==============================================================================
--- sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java [UTF-8] (original)
+++ sis/trunk/core/sis-utility/src/test/java/org/apache/sis/test/XMLTestCase.java [UTF-8] Thu Jan 2 06:08:48 2014
@@ -16,6 +16,7 @@
*/
package org.apache.sis.test;
+import java.net.URL;
import java.util.Map;
import java.util.HashMap;
import java.util.Locale;
@@ -35,13 +36,16 @@ import org.apache.sis.xml.MarshallerPool
import org.apache.sis.xml.XML;
import org.junit.After;
-import static org.opengis.test.Assert.*;
+import static org.apache.sis.test.Assert.*;
/**
- * Base class of XML (un)marshalling tests. SIS (un)marshalling process can be partially controlled
- * by a {@link Context}, which defines (among other) the locale and timezone. Some tests will need
- * to fix the context to a particular locale and timezone before to execute the test.
+ * Base class of tests which contain some XML (un)marshalling.
+ * The subclasses do not need to be fully dedicated to XML.
+ *
+ *
SIS (un)marshalling process can be partially controlled by a {@link Context}, which defines (among other)
+ * the locale and timezone. Some tests will need to fix the context to a particular locale and timezone before
+ * to execute the test.
*
* The {@link #context} field can be initialized by subclasses either explicitely or by invoking
* a {@code createContext(…)} convenience method. The {@link #clearContext()} method will be invoked
@@ -127,11 +131,11 @@ public abstract strictfp class XMLTestCa
}
/**
- * Initializes the {@link #context} to the given locale and timezone.
+ * Initializes the {@link #context} to the given locale and timezone.
*
* @param marshal {@code true} for setting the {@link Context#MARSHALLING} flag.
- * @param locale The locale, or {@code null} for the default.
- * @param timezone The timezone, or {@code null} for the default.
+ * @param locale The locale, or {@code null} for the default.
+ * @param timezone The timezone, or {@code null} for the default.
*
* @see #clearContext()
*/
@@ -155,11 +159,56 @@ public abstract strictfp class XMLTestCa
}
/**
+ * Returns the URL to the XML file of the given name.
+ * The file shall be in the same package than the final subclass of {@code this}.
+ *
+ * @param filename The name of the XML file.
+ * @return The URL to the given XML file.
+ */
+ private URL getResource(final String filename) {
+ final URL resource = getClass().getResource(filename);
+ assertNotNull(filename, resource);
+ return resource;
+ }
+
+ /**
+ * Appends explicitely {@code "xmlns:xsi"} to the list of attributes to ignore.
+ * This is not needed on JDK7 if the {@code "xmlns:*"} property has been defined,
+ * but required on JDK6. Not sure why...
+ */
+ @org.apache.sis.util.Workaround(library = "JDK", version = "1.6")
+ private static String[] addIgnoreXSI(String[] ignoredAttributes) {
+ final int length = ignoredAttributes.length;
+ ignoredAttributes = java.util.Arrays.copyOf(ignoredAttributes, length + 1);
+ ignoredAttributes[length] = "xmlns:xsi";
+ return ignoredAttributes;
+ }
+
+ /**
+ * Marshals the given object and ensure that the result is equals to the content of the given file.
+ *
+ * @param filename The name of the XML file in the package of the final subclass of {@code this}.
+ * @param object The object to marshal.
+ * @param ignoredAttributes The fully-qualified names of attributes to ignore
+ * (typically {@code "xmlns:*"} and {@code "xsi:schemaLocation"}).
+ * @throws JAXBException If an error occurred during marshalling.
+ *
+ * @see #unmarshalFile(Class, String)
+ */
+ protected final void assertMarshalEqualsFile(final String filename, final Object object,
+ final String... ignoredAttributes) throws JAXBException
+ {
+ assertXmlEquals(getResource(filename), marshal(object), addIgnoreXSI(ignoredAttributes));
+ }
+
+ /**
* Marshals the given object using the {@linkplain #getMarshallerPool() test marshaller pool}.
*
* @param object The object to marshal.
* @return The marshalled object.
* @throws JAXBException If an error occurred while marshalling the object.
+ *
+ * @see #unmarshal(Class, String)
*/
protected final String marshal(final Object object) throws JAXBException {
final MarshallerPool pool = getMarshallerPool();
@@ -176,6 +225,8 @@ public abstract strictfp class XMLTestCa
* @param object The object to marshal.
* @return The marshalled object.
* @throws JAXBException If an error occurred while marshalling the object.
+ *
+ * @see #unmarshal(Unmarshaller, String)
*/
protected final String marshal(final Marshaller marshaller, final Object object) throws JAXBException {
ArgumentChecks.ensureNonNull("marshaller", marshaller);
@@ -189,6 +240,28 @@ public abstract strictfp class XMLTestCa
}
/**
+ * Unmarshals the content of the given test file using the {@linkplain #getMarshallerPool() test marshaller pool}.
+ * The resource is obtained by a call to {@code getClass().getResource(filename)}, which implies that the file
+ * shall be in the same package than the subclass of {@code this}.
+ *
+ * @param Compile-time type of {@code type} argument.
+ * @param type The expected type of the unmarshalled object.
+ * @param filename The name of the XML file in the package of the final subclass of {@code this}.
+ * @return The object unmarshalled from the given file.
+ * @throws JAXBException If an error occurred during unmarshalling.
+ *
+ * @see #assertMarshalEqualsFile(String, Object, String...)
+ */
+ protected final T unmarshalFile(final Class type, final String filename) throws JAXBException {
+ final MarshallerPool pool = getMarshallerPool();
+ final Unmarshaller unmarshaller = pool.acquireUnmarshaller();
+ final Object object = unmarshaller.unmarshal(getResource(filename));
+ pool.recycle(unmarshaller);
+ assertInstanceOf(filename, type, object);
+ return type.cast(object);
+ }
+
+ /**
* Unmarshals the given object using the {@linkplain #getMarshallerPool() test marshaller pool}.
*
* @param Compile-time type of {@code type} argument.
@@ -196,6 +269,8 @@ public abstract strictfp class XMLTestCa
* @param xml The XML representation of the object to unmarshal.
* @return The unmarshalled object.
* @throws JAXBException If an error occurred while unmarshalling the XML.
+ *
+ * @see #marshal(Object)
*/
protected final T unmarshal(final Class type, final String xml) throws JAXBException {
final MarshallerPool pool = getMarshallerPool();
@@ -213,6 +288,8 @@ public abstract strictfp class XMLTestCa
* @param xml The XML representation of the object to unmarshal.
* @return The unmarshalled object.
* @throws JAXBException If an error occurred while unmarshalling the XML.
+ *
+ * @see #marshal(Marshaller, Object)
*/
protected final Object unmarshal(final Unmarshaller unmarshaller, final String xml) throws JAXBException {
ArgumentChecks.ensureNonNull("unmarshaller", unmarshaller);