This is an automated email from the ASF dual-hosted git repository. desruisseaux pushed a commit to branch geoapi-3.1 in repository https://gitbox.apache.org/repos/asf/sis.git
commit d380bad77be3f8e99f4ab482bf979997f9a4fe71 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Sat Aug 26 11:27:30 2023 +0200 Upgrade GeoAPI snapshot. This upgrade deprecates some methods to be replaced by ISO 19111:2019 `ObjectDomain`. --- .../apache/sis/metadata/PropertyAccessorTest.java | 22 +++++++++++----------- .../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, 21 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 8539ea148e..4608aabbea 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 @@ -65,11 +65,11 @@ import static org.apache.sis.metadata.PropertyAccessor.RETURN_PREVIOUS; // Specific to the main and geoapi-3.1 branches: import org.opengis.metadata.citation.ResponsibleParty; -import org.opengis.referencing.ReferenceSystem; import org.opengis.referencing.ReferenceIdentifier; // Specific to the geoapi-3.1 and geoapi-4.0 branches: import org.opengis.metadata.content.AttributeGroup; +import org.opengis.referencing.ObjectDomain; import org.opengis.temporal.Duration; @@ -239,22 +239,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", ReferenceIdentifier.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", ReferenceIdentifier[].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", ReferenceIdentifier.class, + IdentifiedObject.class, "getAlias", "alias", "alias", "Alias", GenericName[].class, + IdentifiedObject.class, "getIdentifiers", "identifiers", "identifier", "Identifiers", ReferenceIdentifier[].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 431d0423ca..7a83f02129 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 @@ -148,10 +148,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 f4f450ec84..28aa186401 160000 --- a/geoapi/snapshot +++ b/geoapi/snapshot @@ -1 +1 @@ -Subproject commit f4f450ec84551b7a1acff2ab437f8698625eb158 +Subproject commit 28aa186401a38bfcf4cf95136c6c2f5caa36e7bc