sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1441581 - in /sis/branches/JDK7/sis-utility/src: main/java/org/apache/sis/internal/util/ main/java/org/apache/sis/util/ main/java/org/apache/sis/util/logging/ test/java/org/apache/sis/math/ test/java/org/apache/sis/test/suite/ test/java/or...
Date Fri, 01 Feb 2013 18:43:07 GMT
Author: desruisseaux
Date: Fri Feb  1 18:43:07 2013
New Revision: 1441581

URL: http://svn.apache.org/viewvc?rev=1441581&view=rev
Log:
Complete the renaming of Arrays to ArraysExt.

Added:
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysExtTest.java
      - copied, changed from r1441575, sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java
Removed:
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java
Modified:
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/SystemListener.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
    sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/package-info.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakHashSetTest.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakValueHashMapTest.java
    sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/SystemListener.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/SystemListener.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/SystemListener.java
(original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/SystemListener.java
Fri Feb  1 18:43:07 2013
@@ -16,11 +16,10 @@
  */
 package org.apache.sis.internal.util;
 
+import java.util.Arrays;
 import java.util.EventListener;
 import org.apache.sis.util.ArraysExt;
 
-import static java.util.Arrays.copyOf;
-
 
 /**
  * Listeners for changes in the Apache SIS system. This listener is used only for rare events,
@@ -51,7 +50,7 @@ public abstract class SystemListener imp
         if (list == null) {
             list = new SystemListener[1];
         } else {
-            list = copyOf(list, list.length + 1);
+            list = Arrays.copyOf(list, list.length + 1);
         }
         list[list.length - 1] = listener;
         listeners = list;

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Static.java Fri Feb  1
18:43:07 2013
@@ -44,7 +44,7 @@ package org.apache.sis.util;
  * <tr><th colspan="2" class="hsep">Structures (trees, collections, arrays, parameters)</th></tr>
  * <tr><td>{@link org.apache.sis.util.collection.Collections}</td>
  *     <td>Additions to the JDK {@link java.util.Collections} methods.</td></tr>
- * <tr><td>{@link Arrays}</td>
+ * <tr><td>{@link ArraysExt}</td>
  *     <td>Insert or remove elements in the middle of arrays.</td></tr>
  *
  * <tr><th colspan="2" class="hsep">Input / Output (including CRS, XML, images)</th></tr>

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Utilities.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Utilities.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Utilities.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/Utilities.java Fri Feb
 1 18:43:07 2013
@@ -299,16 +299,15 @@ public final class Utilities extends Sta
      * <ul>
      *   <li>If the supplied object is {@code null}, then this method returns 0.</li>
      *   <li>Otherwise if the object is an array of objects, then
-     *       {@link java.util.Arrays#deepHashCode(Object[])} is invoked.</li>
+     *       {@link Arrays#deepHashCode(Object[])} is invoked.</li>
      *   <li>Otherwise if the object is an array of primitive type, then the corresponding
-     *       {@link java.util.Arrays#hashCode(double[]) Arrays.hashCode(...)} method is invoked.</li>
+     *       {@link Arrays#hashCode(double[]) Arrays.hashCode(...)} method is invoked.</li>
      *   <li>Otherwise {@link Object#hashCode()} is invoked.</li>
      * </ul>
      *
      * This method should be invoked <strong>only</strong> if the object type
is declared
      * exactly as {@code Object}, not as some subtype like {@code Object[]}, {@code String}
or
-     * {@code float[]}. In the later cases, use the appropriate {@link java.util.Arrays}
method
-     * instead.
+     * {@code float[]}. In the later cases, use the appropriate {@link Arrays} method instead.
      *
      * @param object The object to compute hash code. May be {@code null}.
      * @return The hash code of the given object.
@@ -335,16 +334,15 @@ public final class Utilities extends Sta
      *
      * <ul>
      *   <li>If the object is an array of objects, then
-     *       {@link java.util.Arrays#deepToString(Object[])} is invoked.</li>
+     *       {@link Arrays#deepToString(Object[])} is invoked.</li>
      *   <li>Otherwise if the object is an array of primitive type, then the corresponding
-     *       {@link java.util.Arrays#toString(double[]) Arrays.toString(...)} method is invoked.</li>
+     *       {@link Arrays#toString(double[]) Arrays.toString(...)} method is invoked.</li>
      *   <li>Otherwise {@link String#valueOf(Object)} is invoked.</li>
      * </ul>
      *
      * This method should be invoked <strong>only</strong> if the object type
is declared
      * exactly as {@code Object}, not as some subtype like {@code Object[]}, {@code Number}
or
-     * {@code float[]}. In the later cases, use the appropriate {@link java.util.Arrays}
method
-     * instead.
+     * {@code float[]}. In the later cases, use the appropriate {@link Arrays} method instead.
      *
      * @param object The object to format as a string. May be {@code null}.
      * @return A string representation of the given object.

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/logging/Logging.java Fri
Feb  1 18:43:07 2013
@@ -16,6 +16,7 @@
  */
 package org.apache.sis.util.logging;
 
+import java.util.Arrays;
 import java.util.Comparator;
 import java.util.ServiceLoader;
 import java.util.logging.Level;
@@ -29,8 +30,6 @@ import org.apache.sis.util.ArraysExt;
 import org.apache.sis.util.Exceptions;
 import org.apache.sis.util.Classes;
 
-import static java.util.Arrays.binarySearch;
-
 
 /**
  * A set of utilities method for configuring loggings in SIS. Library implementors shall
fetch
@@ -250,7 +249,7 @@ public final class Logging extends Stati
                 Logging[] children = logging.children;
                 offset = base.indexOf('.', offset);
                 final String name = (offset >= 0) ? base.substring(0, offset) : base;
-                int i = binarySearch(children, name, COMPARATOR);
+                int i = Arrays.binarySearch(children, name, COMPARATOR);
                 if (i < 0) {
                     // No exact match found.
                     if (!create) {

Modified: sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/package-info.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/package-info.java (original)
+++ sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/util/package-info.java Fri
Feb  1 18:43:07 2013
@@ -29,7 +29,7 @@
  *         {@link org.apache.sis.util.Numbers},
  *         {@link org.apache.sis.util.Classes}.</li>
  *     <li>Arrays:
- *         {@link org.apache.sis.util.Arrays}.</li>
+ *         {@link org.apache.sis.util.ArraysExt}.</li>
  *     <li>Other standard Java types:
  *         {@link org.apache.sis.util.Exceptions}.</li>
  *   </ul></li>

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/math/MathFunctionsTest.java
Fri Feb  1 18:43:07 2013
@@ -34,7 +34,7 @@ import static org.apache.sis.util.Arrays
  * @version 0.3
  * @module
  */
-@DependsOn(org.apache.sis.util.ArraysTest.class)
+@DependsOn(org.apache.sis.util.ArraysExtTest.class)
 public final strictfp class MathFunctionsTest extends TestCase {
     /**
      * Small number for floating point comparisons.

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/test/suite/UtilityTestSuite.java
Fri Feb  1 18:43:07 2013
@@ -34,7 +34,7 @@ import org.junit.runners.Suite;
     org.apache.sis.internal.test.XMLComparatorTest.class,
 
     // Most basic functions of SIS library.
-    org.apache.sis.util.ArraysTest.class,
+    org.apache.sis.util.ArraysExtTest.class,
     org.apache.sis.util.CharactersTest.class,
     org.apache.sis.util.CharSequencesTest.class,
     org.apache.sis.util.StringBuildersTest.class,

Copied: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysExtTest.java
(from r1441575, sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysExtTest.java?p2=sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysExtTest.java&p1=sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java&r1=1441575&r2=1441581&rev=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysTest.java (original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/ArraysExtTest.java Fri
Feb  1 18:43:07 2013
@@ -23,7 +23,7 @@ import static org.junit.Assert.*;
 
 
 /**
- * Tests the {@link Arrays} utility methods.
+ * Tests the {@link ArraysExt} utility methods.
  *
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Johann Sorel (Geomatys)
@@ -31,9 +31,9 @@ import static org.junit.Assert.*;
  * @version 0.3
  * @module
  */
-public final strictfp class ArraysTest extends TestCase {
+public final strictfp class ArraysExtTest extends TestCase {
     /**
-     * Tests {@link Arrays#removeDuplicated(Object[])}.
+     * Tests {@link ArraysExt#removeDuplicated(Object[])}.
      */
     @Test
     public void testRemoveDuplicated() {
@@ -43,7 +43,7 @@ public final strictfp class ArraysTest e
     }
 
     /**
-     * Tests {@link Arrays#reverse(int[])}.
+     * Tests {@link ArraysExt#reverse(int[])}.
      * The test uses an array of even length, then an array of odd length.
      */
     @Test
@@ -58,7 +58,7 @@ public final strictfp class ArraysTest e
     }
 
     /**
-     * Tests {@link Arrays#unionOfSorted(int[], int[])}.
+     * Tests {@link ArraysExt#unionOfSorted(int[], int[])}.
      */
     @Test
     public void testUnionOfSorted() {

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/CharSequencesTest.java
Fri Feb  1 18:43:07 2013
@@ -38,7 +38,7 @@ import static org.apache.sis.util.CharSe
  * @module
  */
 @DependsOn({
-    ArraysTest.class,
+    ArraysExtTest.class,
     CharactersTest.class
 })
 public final strictfp class CharSequencesTest extends TestCase {

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakHashSetTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakHashSetTest.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakHashSetTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakHashSetTest.java
Fri Feb  1 18:43:07 2013
@@ -38,7 +38,7 @@ import static org.apache.sis.test.TestUt
  * @version 0.3
  * @module
  */
-@DependsOn(org.apache.sis.util.ArraysTest.class)
+@DependsOn(org.apache.sis.util.ArraysExtTest.class)
 public final strictfp class WeakHashSetTest extends TestCase {
     /**
      * The size of the test sets to be created.

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakValueHashMapTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakValueHashMapTest.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakValueHashMapTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/collection/WeakValueHashMapTest.java
Fri Feb  1 18:43:07 2013
@@ -39,7 +39,7 @@ import static org.apache.sis.test.TestUt
  * @version 0.3
  * @module
  */
-@DependsOn(org.apache.sis.util.ArraysTest.class)
+@DependsOn(org.apache.sis.util.ArraysExtTest.class)
 public final strictfp class WeakValueHashMapTest extends TestCase {
     /**
      * The size of the test sets to be created.

Modified: sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java?rev=1441581&r1=1441580&r2=1441581&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
(original)
+++ sis/branches/JDK7/sis-utility/src/test/java/org/apache/sis/util/resources/IndexedResourceBundleTest.java
Fri Feb  1 18:43:07 2013
@@ -40,7 +40,7 @@ import static org.apache.sis.test.Assert
  * @since   0.3 (derived from geotk-2.2)
  * @version 0.3
  */
-@DependsOn(org.apache.sis.util.ArraysTest.class)
+@DependsOn(org.apache.sis.util.ArraysExtTest.class)
 public final strictfp class IndexedResourceBundleTest extends TestCase {
     /**
      * The resource bundle in process of being tested. Shall be reset to {@code null} after
every



Mime
View raw message