sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1466670 - in /sis/branches/JDK6: ./ sis-metadata/src/main/java/org/apache/sis/metadata/ sis-referencing/src/main/java/org/apache/sis/geometry/ sis-referencing/src/test/java/org/apache/sis/geometry/ sis-utility/src/main/java/org/apache/sis/...
Date Wed, 10 Apr 2013 21:02:00 GMT
Author: desruisseaux
Date: Wed Apr 10 21:02:00 2013
New Revision: 1466670

URL: http://svn.apache.org/r1466670
Log:
Merge from the JDK7 branch.

Added:
    sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
      - copied, changed from r1466650, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
    sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedHashSet.java
      - copied unchanged from r1466650, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedHashSet.java
Removed:
    sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedArrayList.java
    sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedHashMap.java
    sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/CheckedHashSet.java
Modified:
    sis/branches/JDK6/   (props changed)
    sis/branches/JDK6/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
    sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
    sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
    sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
    sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
    sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
    sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java

Propchange: sis/branches/JDK6/
------------------------------------------------------------------------------
  Merged /sis/branches/JDK7:r1466462-1466650

Modified: sis/branches/JDK6/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-metadata/src/main/java/org/apache/sis/metadata/ModifiableMetadata.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -25,8 +25,8 @@ import net.jcip.annotations.ThreadSafe;
 import org.opengis.util.CodeList;
 import org.apache.sis.util.logging.Logging;
 import org.apache.sis.util.resources.Errors;
-import org.apache.sis.util.collection.CheckedHashSet;
-import org.apache.sis.util.collection.CheckedArrayList;
+import org.apache.sis.internal.util.CheckedHashSet;
+import org.apache.sis.internal.util.CheckedArrayList;
 
 import static org.apache.sis.util.ArgumentChecks.ensureNonNull;
 import static org.apache.sis.util.collection.CollectionsExt.isNullOrEmpty;

Modified: sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/DirectPosition2D.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -116,11 +116,11 @@ public class DirectPosition2D extends Po
      * The actual axis orientations are determined by the specified CRS.
      * See the <a href="#skip-navbar_top">class javadoc</a> for details.
      *
+     * @param crs The coordinate reference system, or {@code null}.
      * @param x   The first ordinate value (not necessarily horizontal).
      * @param y   The second ordinate value (not necessarily vertical).
-     * @param crs The coordinate reference system, or {@code null}.
      */
-    public DirectPosition2D(final double x, final double y, final CoordinateReferenceSystem
crs) {
+    public DirectPosition2D(final CoordinateReferenceSystem crs, final double x, final double
y) {
         super(x, y);
         this.crs = crs;
         ensureDimensionMatches("crs", 2, crs);

Modified: sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -217,11 +217,11 @@ public class Envelope2D extends Rectangl
      * If the given rectangle has negative width or height, they will be interpreted
      * as an envelope spanning the anti-meridian.
      *
-     * @param rect The rectangle to copy (can not be {@code null}).
      * @param crs  The coordinate reference system, or {@code null}.
+     * @param rect The rectangle to copy (can not be {@code null}).
      * @throws MismatchedDimensionException If the given CRS is not two-dimensional.
      */
-    public Envelope2D(final Rectangle2D rect, final CoordinateReferenceSystem crs)
+    public Envelope2D(final CoordinateReferenceSystem crs, final Rectangle2D rect)
             throws MismatchedDimensionException
     {
         super(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight()); // Really 'super',
not 'this'.
@@ -244,8 +244,8 @@ public class Envelope2D extends Rectangl
      * @param  height The envelope height. May be negative for envelope spanning the anti-meridian.
      * @throws MismatchedDimensionException If the given CRS is not two-dimensional.
      */
-    public Envelope2D(final double x, final double y, final double width, final double height,
-            final CoordinateReferenceSystem crs) throws MismatchedDimensionException
+    public Envelope2D(final CoordinateReferenceSystem crs, final double x, final double y,
+            final double width, final double height) throws MismatchedDimensionException
     {
         super(x, y, width, height); // Really 'super', not 'this'.
         ensureDimensionMatches("crs", 2, crs);
@@ -303,7 +303,7 @@ public class Envelope2D extends Rectangl
      */
     @Override
     public DirectPosition2D getLowerCorner() {
-        return new DirectPosition2D(x, y, crs);
+        return new DirectPosition2D(crs, x, y);
     }
 
     /**
@@ -326,7 +326,7 @@ public class Envelope2D extends Rectangl
      */
     @Override
     public DirectPosition2D getUpperCorner() {
-        return new DirectPosition2D(x+width, y+height, crs);
+        return new DirectPosition2D(crs, x+width, y+height);
     }
 
     /**
@@ -692,7 +692,7 @@ public class Envelope2D extends Rectangl
     @Override
     public Envelope2D createIntersection(final Rectangle2D rect) {
         final Envelope2D env = (rect instanceof Envelope2D) ? (Envelope2D) rect : null;
-        final Envelope2D inter = new Envelope2D(NaN, NaN, NaN, NaN, crs);
+        final Envelope2D inter = new Envelope2D(crs, NaN, NaN, NaN, NaN);
         for (int i=0; i!=2; i++) {
             final double min0, min1, span0, span1;
             if (i == 0) {

Modified: sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-referencing/src/main/java/org/apache/sis/geometry/ImmutableEnvelope.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -116,12 +116,12 @@ public final class ImmutableEnvelope ext
      * <p>The main purpose of this method is to assign a non-null CRS when the envelope
to
      * copy has a null CRS.</p>
      *
-     * @param  envelope The envelope from which to copy ordinate values.
      * @param  crs      The CRS to assign to this envelope, or {@code null}.
+     * @param  envelope The envelope from which to copy ordinate values.
      * @throws MismatchedDimensionException If the dimension of the given CRS is not equals
      *         to the dimension of the given envelope.
      */
-    public ImmutableEnvelope(final Envelope envelope, final CoordinateReferenceSystem crs)
+    public ImmutableEnvelope(final CoordinateReferenceSystem crs, final Envelope envelope)
             throws MismatchedDimensionException
     {
         super(envelope);
@@ -142,13 +142,13 @@ public final class ImmutableEnvelope ext
      * See the javadoc of the {@link GeneralEnvelope#GeneralEnvelope(CharSequence) GeneralEnvelope}
      * constructor for more information.
      *
-     * @param  wkt The {@code BOX}, {@code POLYGON} or other kind of element to parse.
      * @param  crs The coordinate reference system, or {@code null} if none.
+     * @param  wkt The {@code BOX}, {@code POLYGON} or other kind of element to parse.
      * @throws IllegalArgumentException If the given string can not be parsed.
      * @throws MismatchedDimensionException If the dimension of the given CRS is not equals
      *         to the dimension of the parsed envelope.
      */
-    public ImmutableEnvelope(final CharSequence wkt, final CoordinateReferenceSystem crs)
+    public ImmutableEnvelope(final CoordinateReferenceSystem crs, final CharSequence wkt)
             throws IllegalArgumentException, MismatchedDimensionException
     {
         super(wkt);

Modified: sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/AbstractEnvelopeTest.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -82,7 +82,7 @@ public final strictfp class AbstractEnve
                 break;
             }
             case RECTANGLE: {
-                envelope = new Envelope2D(xmin, ymin, xmax - xmin, ymax - ymin, WGS84);
+                envelope = new Envelope2D(WGS84, xmin, ymin, xmax - xmin, ymax - ymin);
                 break;
             }
             default: throw new IllegalArgumentException(String.valueOf(type));

Modified: sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-referencing/src/test/java/org/apache/sis/geometry/Envelope2DTest.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -43,7 +43,7 @@ public final strictfp class Envelope2DTe
      */
     @Test
     public void testSerialization() {
-        final Envelope2D e1 = new Envelope2D(-20, -10, 40, 20, WGS84);
+        final Envelope2D e1 = new Envelope2D(WGS84, -20, -10, 40, 20);
         final Envelope2D e2 = assertSerializedEquals(e1);
         assertNotSame(e1, e2);
         validate(e2);

Copied: sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
(from r1466650, sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java)
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java?p2=sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java&p1=sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java&r1=1466650&r2=1466670&rev=1466670&view=diff
==============================================================================
--- sis/branches/JDK7/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/internal/util/CheckedArrayList.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -293,7 +293,7 @@ public class CheckedArrayList<E> extends
     @Override
     public Iterator<E> iterator() {
         synchronized (getLock()) {
-            return new Iter<>(super.iterator());
+            return new Iter<Iterator<E>>(super.iterator());
         }
     }
 

Modified: sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java?rev=1466670&r1=1466669&r2=1466670&view=diff
==============================================================================
--- sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
[UTF-8] (original)
+++ sis/branches/JDK6/sis-utility/src/main/java/org/apache/sis/util/collection/package-info.java
[UTF-8] Wed Apr 10 21:02:00 2013
@@ -34,16 +34,6 @@
  *     and supports concurrency, while the other implementations are more lightweight, sometime
  *     thread-safe but without concurrency support.
  *   </li><li>
- *     {@link org.apache.sis.util.collection.CheckedContainer},
- *     {@link org.apache.sis.util.collection.CheckedArrayList},
- *     {@link org.apache.sis.util.collection.CheckedHashSet} and
- *     {@link org.apache.sis.util.collection.CheckedHashMap} can be used for combining <em>runtime</em>
- *     type safety with thread-safety (without concurrency). They are similar in functionalities
to
- *     the wrappers provided by the standard {@link java.util.Collections} methods, except
that they
- *     combine both functionalities in a single class (so reducing the amount of indirection),
provide
- *     a hook for making the collections read-only and allow the caller to specify the synchronization
- *     lock of his choice.
- *   </li><li>
  *     {@linkplain org.apache.sis.util.collection.CollectionsExt#derivedMap Derived Map}
and
  *     {@linkplain org.apache.sis.util.collection.CollectionsExt#derivedSet derived Set}
are wrapper collections
  *     in which the keys or the values are derived on-the-fly from the content of an other
collection.



Mime
View raw message