This is an automated email from the ASF dual-hosted git repository.

desruisseaux pushed a commit to branch geoapi-4.0
in repository https://gitbox.apache.org/repos/asf/sis.git

commit 0c9e91cb8bcc83e32f3d9c3f6272dd731db605ab
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Fri Oct 3 11:54:00 2025 +0200

    Remove more methods which were deprecated in the SIS 1.5 release.
    The `forRemoval` flag was missing in `@Deprecated` annotations,
    but some of those methods will be kept on the main branch.
---
 .../apache/sis/coverage/grid/GridDerivation.java   | 34 ----------------------
 .../org/apache/sis/coverage/grid/GridExtent.java   | 34 ----------------------
 .../org/apache/sis/coverage/grid/GridGeometry.java | 17 -----------
 .../iso/acquisition/DefaultRequestedDate.java      | 26 -----------------
 .../iso/acquisition/DefaultRequirement.java        | 14 ---------
 .../sis/metadata/iso/citation/DefaultCitation.java | 14 ---------
 .../apache/sis/metadata/iso/MarshallingTest.java   |  2 +-
 .../main/org/apache/sis/io/wkt/Formatter.java      | 22 +++-----------
 .../main/org/apache/sis/io/wkt/package-info.java   |  2 +-
 .../main/org/apache/sis/storage/FeatureQuery.java  | 19 +++---------
 .../main/org/apache/sis/storage/package-info.java  |  2 +-
 11 files changed, 11 insertions(+), 175 deletions(-)

diff --git 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
index 5a839eea07..00e8185163 100644
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
@@ -458,22 +458,6 @@ public class GridDerivation {
         return this;
     }
 
-    /**
-     * Specifies the maximum subsampling values (32-bits version).
-     * See {@link #maximumSubsampling(long...)} for details.
-     *
-     * @param  subsampling  maximal subsampling values (inclusive).
-     * @return {@code this} for method call chaining.
-     * @since 1.1
-     *
-     * @deprecated Use the version with {@code long} integers instead of 
{@code int}.
-     * Small overviews of large images require large subsampling factors.
-     */
-    @Deprecated(since="1.5")
-    public GridDerivation maximumSubsampling(final int[] subsampling) {
-        return maximumSubsampling(ArraysExt.copyAsLongs(subsampling));
-    }
-
     /**
      * Adapts the base grid for the geographic area and resolution of the 
given grid geometry.
      * By default, the new grid geometry will cover the intersection of the 
{@linkplain #base}
@@ -1014,24 +998,6 @@ public class GridDerivation {
         return subsample(subsampling);
     }
 
-    /**
-     * Requests a grid geometry over a sub-region (32-bits version).
-     * See {@link #subgrid(GridExtent, long...)} for details.
-     *
-     * @param  areaOfInterest  the desired grid extent in unit of base grid 
cell, or {@code null}.
-     * @param  subsampling     the subsampling to apply on each grid 
dimension, or {@code null} if none.
-     * @return {@code this} for method call chaining.
-     *
-     * @since 1.1
-     *
-     * @deprecated Use the version with {@code long} integers instead of 
{@code int}.
-     * Small overviews of large images require large subsampling factors.
-     */
-    @Deprecated(since="1.5")
-    public GridDerivation subgrid(GridExtent areaOfInterest, int[] 
subsampling) {
-        return subgrid(areaOfInterest, ArraysExt.copyAsLongs(subsampling));
-    }
-
     /**
      * Applies a subsampling on the grid geometry to build.
      * This method can be invoked as an alternative to {@code subgrid(…)} 
methods if only the resolution needs to be changed.
diff --git 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java
 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java
index 0d313275ac..e680141015 100644
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridExtent.java
@@ -1701,22 +1701,6 @@ public class GridExtent implements GridEnvelope, 
LenientComparable, Serializable
         return Arrays.equals(coordinates, sub.coordinates) ? this : sub;
     }
 
-    /**
-     * Creates a new subsampled grid extent (32-bits version).
-     * See {@link #subsample(long...)} for details.
-     *
-     * @param  periods  the subsampling factors for each dimension of this 
grid extent.
-     * @return the subsampled extent, or {@code this} if subsampling results 
in the same extent.
-     * @throws IllegalArgumentException if a period is not greater than zero.
-     *
-     * @deprecated Use the version with {@code long} integers instead of 
{@code int}.
-     * Small overviews of large images require large subsampling factors.
-     */
-    @Deprecated(since="1.5")
-    public GridExtent subsample(final int[] periods) {
-        return subsample(ArraysExt.copyAsLongs(periods));
-    }
-
     /**
      * Creates a new grid extent upsampled by the given number of cells along 
each grid dimensions.
      * This method multiplies the {@linkplain #getLow(int) low coordinates}
@@ -1755,24 +1739,6 @@ public class GridExtent implements GridEnvelope, 
LenientComparable, Serializable
         return Arrays.equals(coordinates, sub.coordinates) ? this : sub;
     }
 
-    /**
-     * Creates a new upsampled grid extent (32-bits version).
-     * See {@link #upsample(long...)} for details.
-     *
-     * @param  periods  the upsampling factors for each dimension of this grid 
extent.
-     * @return the upsampled extent, or {@code this} if upsampling results in 
the same extent.
-     * @throws IllegalArgumentException if a period is not greater than zero.
-     * @throws ArithmeticException if the upsampled extent overflows the 
{@code long} capacity.
-     * @since 1.3
-     *
-     * @deprecated Use the version with {@code long} integers instead of 
{@code int}.
-     * Small overviews of large images require large subsampling factors.
-     */
-    @Deprecated(since="1.5")
-    public GridExtent upsample(final int[] periods) {
-        return upsample(ArraysExt.copyAsLongs(periods));
-    }
-
     /**
      * Returns a slice of this grid extent computed by a ratio between 0 and 1 
inclusive.
      * This is a helper method for {@link GridDerivation#sliceByRatio(double, 
int...)} implementation.
diff --git 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java
 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java
index 58bd4f5f0c..7a73ef7192 100644
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridGeometry.java
@@ -1587,23 +1587,6 @@ public class GridGeometry implements LenientComparable, 
Serializable {
         return new GridGeometry(newExtent, cornerToCenter(newGridToCRS), 
newGridToCRS, envelope, newResolution, nonLinears);
     }
 
-    /**
-     * Creates a new upsampled grid geometry (32-bits version).
-     * See {@link #upsample(long...)} for details.
-     *
-     * @param  periods  the upsampling factors for each dimension of this grid 
geometry.
-     * @return the upsampled grid geometry, or {@code this} is upsampling 
results in the same extent.
-     * @throws IllegalArgumentException if a period is not greater than zero.
-     * @since 1.3
-     *
-     * @deprecated Use the version with {@code long} integers instead of 
{@code int}.
-     * Small overviews of large images require large subsampling factors.
-     */
-    @Deprecated(since="1.5")
-    public GridGeometry upsample(final int[] periods) {
-        return upsample(ArraysExt.copyAsLongs(periods));
-    }
-
     /**
      * Translates grid coordinates by the given number of cells without 
changing "real world" coordinates.
      * The returned grid has the same {@linkplain GridExtent#getSize(int) 
size} than this grid,
diff --git 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java
 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java
index f1a9226e80..3315d2fd25 100644
--- 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java
+++ 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequestedDate.java
@@ -16,14 +16,12 @@
  */
 package org.apache.sis.metadata.iso.acquisition;
 
-import java.util.Date;
 import java.time.temporal.Temporal;
 import jakarta.xml.bind.annotation.XmlType;
 import jakarta.xml.bind.annotation.XmlElement;
 import jakarta.xml.bind.annotation.XmlRootElement;
 import org.opengis.metadata.acquisition.RequestedDate;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.temporal.TemporalDate;
 
 
 /**
@@ -146,18 +144,6 @@ public class DefaultRequestedDate extends ISOMetadata 
implements RequestedDate {
         requestedDateOfCollection = newValue;
     }
 
-    /**
-     * Sets the preferred date and time of collection.
-     *
-     * @param  newValue  the new requested date of collection value.
-     *
-     * @deprecated Replaced by {@link #setRequestedDateOfCollection(Temporal)}.
-     */
-    @Deprecated(since="1.5")
-    public void setRequestedDateOfCollection(final Date newValue) {
-        setRequestedDateOfCollection(TemporalDate.toTemporal(newValue));
-    }
-
     /**
      * Returns the latest date and time collection must be completed.
      *
@@ -184,16 +170,4 @@ public class DefaultRequestedDate extends ISOMetadata 
implements RequestedDate {
         checkWritePermission(latestAcceptableDate);
         latestAcceptableDate = newValue;
     }
-
-    /**
-     * Sets the latest date and time collection must be completed.
-     *
-     * @param  newValue  the new latest acceptable data value.
-     *
-     * @deprecated Replaced by {@link #setLatestAcceptableDate(Temporal)}.
-     */
-    @Deprecated(since="1.5")
-    public void setLatestAcceptableDate(final Date newValue) {
-        setLatestAcceptableDate(TemporalDate.toTemporal(newValue));
-    }
 }
diff --git 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
index d0ed5d144f..5dd0541705 100644
--- 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
+++ 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/acquisition/DefaultRequirement.java
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.metadata.iso.acquisition;
 
-import java.util.Date;
 import java.util.Collection;
 import java.time.temporal.Temporal;
 import jakarta.xml.bind.annotation.XmlType;
@@ -29,7 +28,6 @@ import org.opengis.metadata.acquisition.RequestedDate;
 import org.opengis.metadata.acquisition.Requirement;
 import org.opengis.metadata.citation.Citation;
 import org.apache.sis.metadata.iso.ISOMetadata;
-import org.apache.sis.temporal.TemporalDate;
 
 // Specific to the geoapi-4.0 branch:
 import org.opengis.metadata.citation.Responsibility;
@@ -332,18 +330,6 @@ public class DefaultRequirement extends ISOMetadata 
implements Requirement {
         expiryDate = newValue;
     }
 
-    /**
-     * Sets the date and time after which collection is no longer valid.
-     *
-     * @param  newValue  the new expiry date.
-     *
-     * @deprecated Replaced by {@link #setExpiryDate(Temporal)}.
-     */
-    @Deprecated(since="1.5")
-    public void setExpiryDate(final Date newValue) {
-        setExpiryDate(TemporalDate.toTemporal(newValue));
-    }
-
     /**
      * Returns the plan that identifies solution to satisfy the requirement.
      *
diff --git 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/citation/DefaultCitation.java
 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/citation/DefaultCitation.java
index 463e114b85..5fbdae63c0 100644
--- 
a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/citation/DefaultCitation.java
+++ 
b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/iso/citation/DefaultCitation.java
@@ -16,7 +16,6 @@
  */
 package org.apache.sis.metadata.iso.citation;
 
-import java.util.Date;
 import java.util.Collection;
 import java.time.temporal.Temporal;
 import jakarta.xml.bind.annotation.XmlType;
@@ -36,7 +35,6 @@ import org.apache.sis.xml.IdentifierMap;
 import org.apache.sis.xml.bind.FilterByVersion;
 import org.apache.sis.xml.bind.NonMarshalledAuthority;
 import org.apache.sis.xml.internal.shared.LegacyNamespaces;
-import org.apache.sis.temporal.TemporalDate;
 import org.apache.sis.metadata.TitleProperty;
 import org.apache.sis.metadata.iso.ISOMetadata;
 import static org.apache.sis.util.collection.Containers.isNullOrEmpty;
@@ -371,18 +369,6 @@ public class DefaultCitation extends ISOMetadata 
implements Citation {
         editionDate = newValue;
     }
 
-    /**
-     * Sets the date of the edition.
-     *
-     * @param  newValue  the new edition date, or {@code null} if none.
-     *
-     * @deprecated Replaced by {@link #setEditionDate(Temporal)}.
-     */
-    @Deprecated(since="1.5")
-    public void setEditionDate(final Date newValue) {
-        setEditionDate(TemporalDate.toTemporal(newValue));
-    }
-
     /**
      * Returns the unique identifier for the resource.
      *
diff --git 
a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/iso/MarshallingTest.java
 
b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/iso/MarshallingTest.java
index 5685ed4bcf..b6ed972225 100644
--- 
a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/iso/MarshallingTest.java
+++ 
b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/iso/MarshallingTest.java
@@ -414,7 +414,7 @@ public final class MarshallingTest extends TestUsingFile 
implements Filter {
         final var cit = new DefaultCitation();
         cit.setTitle(new SimpleInternationalString("A lost island"));
         cit.setEdition(new SimpleInternationalString("First edition"));
-        cit.setEditionDate(new Date(1523311200000L));
+        cit.setEditionDate(Instant.ofEpochMilli(1523311200000L));
         cit.setCollectiveTitle(new SimpleInternationalString("Popular 
legends"));
         cit.setAlternateTitles(List.of(new SimpleInternationalString("Island 
lost again"),
                                        new Anchor(new 
URI("http://map-example.com";), "Map example")));
diff --git 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
index 17412831f1..00572ca121 100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/Formatter.java
@@ -111,7 +111,7 @@ import org.opengis.referencing.ObjectDomain;
  * </ul>
  *
  * @author  Martin Desruisseaux (IRD, Geomatys)
- * @version 1.5
+ * @version 1.6
  * @since   0.4
  */
 public class Formatter implements Localized {
@@ -1243,21 +1243,6 @@ public class Formatter implements Localized {
         }
     }
 
-    /**
-     * Appends a date.
-     * The {@linkplain Symbols#getSeparator() element separator} will be 
written before the date if needed.
-     * This method exists for compatibility with legacy date objects, but 
{@link #append(Temporal)} should
-     * be preferred in newer code.
-     *
-     * @param  date  the date to append to the WKT, or {@code null} if none.
-     */
-    public void append(final Date date) {
-        if (date != null) {
-            appendSeparator();
-            dateFormat.format(date, buffer, dummy);
-        }
-    }
-
     /**
      * Appends a Boolean value.
      * The {@linkplain Symbols#getSeparator() element separator} will be 
written before the Boolean if needed.
@@ -1633,10 +1618,11 @@ public class Formatter implements Localized {
             }
         } else if (value instanceof ControlledVocabulary) {
             append((ControlledVocabulary) value);
-        } else if (value instanceof Date) {
-            append((Date) value);
         } else if (value instanceof Temporal) {
             append((Temporal) value);
+        } else if (value instanceof Date) {
+            appendSeparator();
+            dateFormat.format((Date) value, buffer, dummy);
         } else if (value instanceof Boolean) {
             append((Boolean) value);
         } else if (value instanceof CharSequence) {
diff --git 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/package-info.java
 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/package-info.java
index d69973a63e..f713292399 100644
--- 
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/package-info.java
+++ 
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/io/wkt/package-info.java
@@ -82,7 +82,7 @@
  * @author  Martin Desruisseaux (IRD, Geomatys)
  * @author  Rémi Eve (IRD)
  * @author  Rueben Schulz (UBC)
- * @version 1.5
+ * @version 1.6
  * @since   0.4
  */
 package org.apache.sis.io.wkt;
diff --git 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/FeatureQuery.java
 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/FeatureQuery.java
index 5478658afa..2c9e54f5b6 100644
--- 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/FeatureQuery.java
+++ 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/FeatureQuery.java
@@ -538,7 +538,7 @@ public class FeatureQuery extends Query implements 
Cloneable, Emptiable, Seriali
      *
      * Columns can be given to the {@link 
FeatureQuery#setProjection(NamedExpression[])} method.
      *
-     * @version 1.5
+     * @version 1.6
      * @since   1.1
      */
     public static final class NamedExpression implements Serializable {
@@ -550,34 +550,23 @@ public class FeatureQuery extends Query implements 
Cloneable, Emptiable, Seriali
         /**
          * The literal, value reference or more complex expression to be 
retrieved by a {@code Query}.
          * Never {@code null}.
-         *
-         * @deprecated Replaced by {@link #expression()} in preparation for 
making {@code NamedExpression} a record.
          */
-        @Deprecated(since = "1.5")
         @SuppressWarnings("serial")
-        public final Expression<? super Feature, ?> expression;
+        private final Expression<? super Feature, ?> expression;
 
         /**
          * The name to assign to the expression result, or {@code null} if 
unspecified.
-         *
-         * @deprecated Replaced by {@link #alias()} in preparation for making 
{@code NamedExpression} a record.
          */
-        @Deprecated(since = "1.5")
         @SuppressWarnings("serial")                 // Most SIS 
implementations are serializable.
-        public final GenericName alias;
+        private final GenericName alias;
 
         /**
          * Whether the expression result should be stored or evaluated every 
times that it is requested.
          * A stored value will exist as a feature {@link Attribute}, while a 
virtual value will exist as
          * a feature {@link Operation}. The latter are commonly called 
"computed fields" and are equivalent
          * to SQL {@code GENERATED ALWAYS} keyword for columns.
-         *
-         * @deprecated Replaced by {@link #type()} in preparation for making 
{@code NamedExpression} a record.
-         *
-         * @since 1.4
          */
-        @Deprecated(since = "1.5")
-        public final ProjectionType type;
+        private final ProjectionType type;
 
         /**
          * Creates a new stored column with the given expression and no name.
diff --git 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/package-info.java
 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/package-info.java
index 6a1020cb19..acb177d843 100644
--- 
a/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/package-info.java
+++ 
b/endorsed/src/org.apache.sis.storage/main/org/apache/sis/storage/package-info.java
@@ -26,7 +26,7 @@
  *
  * @author  Johann Sorel (Geomatys)
  * @author  Martin Desruisseaux (Geomatys)
- * @version 1.5
+ * @version 1.6
  * @since   0.3
  */
 package org.apache.sis.storage;

Reply via email to