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 d1719b85e05c8291335c4a2b4516c743624c91bc Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Tue Aug 22 19:19:26 2023 +0200 Upgrade GeoAPI snapshot. This upgrade deprecates some methods to be replaced by ISO 19111:2019 `ObjectDomain`. --- .../apache/sis/metadata/PropertyAccessorTest.java | 24 ++++++++++++---------- .../org/apache/sis/test/mock/VerticalCRSMock.java | 2 ++ .../operation/builder/ResidualGrid.java | 11 +++++----- .../test/org/apache/sis/util/ClassesTest.java | 2 ++ geoapi/snapshot | 2 +- 5 files changed, 23 insertions(+), 18 deletions(-) diff --git a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/PropertyAccessorTest.java b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/PropertyAccessorTest.java index f703eb91a9..df87389019 100644 --- a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/PropertyAccessorTest.java +++ b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/metadata/PropertyAccessorTest.java @@ -41,7 +41,6 @@ import org.opengis.metadata.identification.*; // Really us import org.opengis.metadata.maintenance.MaintenanceInformation; import org.opengis.metadata.spatial.SpatialRepresentationType; import org.opengis.referencing.IdentifiedObject; -import org.opengis.referencing.ReferenceSystem; import org.opengis.referencing.crs.GeodeticCRS; import org.opengis.referencing.crs.GeographicCRS; import org.opengis.referencing.datum.GeodeticDatum; @@ -69,6 +68,9 @@ import static org.apache.sis.metadata.PropertyAccessor.APPEND; import static org.apache.sis.metadata.PropertyAccessor.RETURN_NULL; import static org.apache.sis.metadata.PropertyAccessor.RETURN_PREVIOUS; +// Branch-dependent imports +import org.opengis.referencing.ObjectDomain; + /** * Tests the {@link PropertyAccessor} class. Every tests in this class instantiates directly a @@ -236,22 +238,22 @@ public final class PropertyAccessorTest extends TestCase { /** * Tests the constructor with a method which override another method with covariant return type. - * This test may need to be updated if a future GeoAPI release modifies the {@link GeographicCRS} interface. + * This test may need to be updated if a future GeoAPI release modifies the {@link GeographicCRS} + * interface or one of its parent interfaces. */ @Test @DependsOnMethod("testConstructorWithInheritance") public void testConstructorWithCovariantReturnType() { final Class<?> type = GeographicCRS.class; assertMappingEquals(new PropertyAccessor(type, type, type), - //……Declaring type……………………………Method……………………………………………JavaBeans……………………………UML identifier………………Sentence…………………………………Type………………………………………………………… - GeographicCRS.class, "getCoordinateSystem", "coordinateSystem", "coordinateSystem", "Coordinate system", EllipsoidalCS.class, // Covariant return type - GeodeticCRS.class, "getDatum", "datum", "datum", "Datum", GeodeticDatum.class, // Covariant return type - IdentifiedObject.class, "getName", "name", "name", "Name", Identifier.class, - IdentifiedObject.class, "getAlias", "alias", "alias", "Alias", GenericName[].class, - ReferenceSystem.class, "getDomainOfValidity", "domainOfValidity", "domainOfValidity", "Domain of validity", Extent.class, - IdentifiedObject.class, "getIdentifiers", "identifiers", "identifier", "Identifiers", Identifier[].class, - IdentifiedObject.class, "getRemarks", "remarks", "remarks", "Remarks", InternationalString.class, - ReferenceSystem.class, "getScope", "scope", "SC_CRS.scope", "Scope", InternationalString.class); + //……Declaring type……………………………Method……………………………………………JavaBeans……………………………UML identifier……………………Sentence………………………………Type………………………………………………………… + GeographicCRS.class, "getCoordinateSystem", "coordinateSystem", "coordinateSystem", "Coordinate system", EllipsoidalCS.class, // Covariant return type + GeodeticCRS.class, "getDatum", "datum", "datum", "Datum", GeodeticDatum.class, // Covariant return type + IdentifiedObject.class, "getName", "name", "name", "Name", Identifier.class, + IdentifiedObject.class, "getAlias", "alias", "alias", "Alias", GenericName[].class, + IdentifiedObject.class, "getIdentifiers", "identifiers", "identifier", "Identifiers", Identifier[].class, + IdentifiedObject.class, "getDomains", "domains", "ObjectUsage.domain", "Domains", ObjectDomain[].class, + IdentifiedObject.class, "getRemarks", "remarks", "remarks", "Remarks", InternationalString.class); } /** diff --git a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/test/mock/VerticalCRSMock.java b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/test/mock/VerticalCRSMock.java index 5c401d6952..e7359a4865 100644 --- a/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/test/mock/VerticalCRSMock.java +++ b/endorsed/src/org.apache.sis.metadata/test/org/apache/sis/test/mock/VerticalCRSMock.java @@ -119,7 +119,9 @@ public final class VerticalCRSMock extends IdentifiedObjectMock } @Override public String getAbbreviation() {return up ? "h" : "d";} + @SuppressWarnings("removal") @Override public InternationalString getScope() {return null;} + @SuppressWarnings("removal") @Override public Extent getDomainOfValidity() {return null;} @Override public VerticalDatumType getVerticalDatumType() {return type;} @Override public VerticalDatum getDatum() {return this;} diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ResidualGrid.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ResidualGrid.java index 80afecdf7b..c3760103a9 100644 --- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ResidualGrid.java +++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/builder/ResidualGrid.java @@ -313,12 +313,11 @@ final class ResidualGrid extends DatumShiftGrid<Dimensionless,Dimensionless> { } @SuppressWarnings({"CloneInNonCloneableClass", "CloneDoesntCallSuperClone"}) - @Override public Matrix clone() {return this;} - @Override public boolean isIdentity() {return false;} - @Override public int getNumCol() {return getGridSize(0);} - @Override public int getNumRow() {return getGridSize(1);} - @Override public Number apply (int[] p) {return getElement(p[1], p[0]);} - @Override public void setElement(int y, int x, double v) {throw new UnsupportedOperationException();} + @Override public Matrix clone() {return this;} + @Override public boolean isIdentity() {return false;} + @Override public int getNumCol() {return getGridSize(0);} + @Override public int getNumRow() {return getGridSize(1);} + @Override public Number apply(int[] p) {return getElement(p[1], p[0]);} /** Computes the matrix element in the given row and column. */ @Override public double getElement(final int y, final int x) { diff --git a/endorsed/src/org.apache.sis.util/test/org/apache/sis/util/ClassesTest.java b/endorsed/src/org.apache.sis.util/test/org/apache/sis/util/ClassesTest.java index 18a50a7b0f..487c3ecaa6 100644 --- a/endorsed/src/org.apache.sis.util/test/org/apache/sis/util/ClassesTest.java +++ b/endorsed/src/org.apache.sis.util/test/org/apache/sis/util/ClassesTest.java @@ -147,10 +147,12 @@ public final class ClassesTest extends TestCase { /** * Dummy class for {@link #testGetLeafInterfaces()}. */ + @SuppressWarnings("removal") private abstract static class T1 implements GeographicCRS { @Override public InternationalString getScope() {return null;} @Override public Extent getDomainOfValidity() {return null;} } + @SuppressWarnings("removal") private abstract static class T2 extends T1 implements SingleCRS, CoordinateOperation {} private abstract static class T3 extends T2 implements Transformation {} diff --git a/geoapi/snapshot b/geoapi/snapshot index 87d87af22a..5339fd99e2 160000 --- a/geoapi/snapshot +++ b/geoapi/snapshot @@ -1 +1 @@ -Subproject commit 87d87af22af0c8e8d9e386e841deab7a4a4b4c30 +Subproject commit 5339fd99e2315254ede82f24be44e46073b2bcb5