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
The following commit(s) were added to refs/heads/geoapi-3.1 by this push:
new 9c83ff49c1 Revert the change in
`CoordinateOperation.getOperationMethod()` because that method was present in
GeoAPI 3.
9c83ff49c1 is described below
commit 9c83ff49c14c71a1fd8095262b435e17b9052af7
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Sat May 11 17:57:58 2024 +0200
Revert the change in `CoordinateOperation.getOperationMethod()` because
that method was present in GeoAPI 3.
---
.../main/org/apache/sis/referencing/Properties.java | 2 +-
.../sis/referencing/operation/AbstractCoordinateOperation.java | 8 ++++----
.../sis/referencing/operation/SingleOperationMarshallingTest.java | 4 ++--
geoapi/snapshot | 2 +-
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
index ddbde475a0..5a3d432312 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/Properties.java
@@ -157,7 +157,7 @@ final class Properties extends AbstractMap<String,Object>
implements Serializabl
}
case 7: { // OPERATION_VERSION_KEY
if (object instanceof CoordinateOperation) {
- return ((CoordinateOperation)
object).getOperationVersion().orElse(null);
+ return ((CoordinateOperation)
object).getOperationVersion();
}
break;
}
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
index 2f5ffd4044..4acbf9fde8 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/AbstractCoordinateOperation.java
@@ -423,7 +423,7 @@ check: for (int isTarget=0; ; isTarget++) { //
0 == source check; 1
sourceCRS = operation.getSourceCRS();
targetCRS = operation.getTargetCRS();
interpolationCRS =
operation.getInterpolationCRS().orElse(null);
- operationVersion =
operation.getOperationVersion().orElse(null);
+ operationVersion = operation.getOperationVersion();
coordinateOperationAccuracy =
operation.getCoordinateOperationAccuracy();
transform = operation.getMathTransform();
if (operation instanceof AbstractCoordinateOperation) {
@@ -557,11 +557,11 @@ check: for (int isTarget=0; ; isTarget++) {
// 0 == source check; 1
* nature of the parameters. In principle this property is irrelevant to
coordinate
* {@linkplain DefaultConversion conversions}, but Apache SIS accepts it
anyway.
*
- * @return the coordinate operation version.
+ * @return the coordinate operation version, or {@code null} if none.
*/
@Override
- public Optional<String> getOperationVersion() {
- return Optional.ofNullable(operationVersion);
+ public String getOperationVersion() {
+ return operationVersion;
}
/**
diff --git
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java
index ebd448c3e9..a7d05b2892 100644
---
a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java
+++
b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/SingleOperationMarshallingTest.java
@@ -156,7 +156,7 @@ public final class SingleOperationMarshallingTest extends
TestCase.WithLogs {
assertEquals("World Mercator", c.getName().getCode(), "name");
assertEquals("3395", getSingleton(c.getIdentifiers()).getCode(),
"identifier");
assertEquals("Very small scale mapping.", getScope(c), "scope");
- assertTrue (c.getOperationVersion().isEmpty(), "operationVersion");
+ assertNull(c.getOperationVersion(), "operationVersion");
final GeographicBoundingBox e = getDomainOfValidity(c);
assertEquals(+180, e.getEastBoundLongitude(), "eastBoundLongitude");
@@ -221,7 +221,7 @@ public final class SingleOperationMarshallingTest extends
TestCase.WithLogs {
assertEquals("NTF (Paris) to NTF (1)", c.getName().getCode(), "name");
assertEquals("1763", getSingleton(c.getIdentifiers()).getCode(),
"identifier");
assertEquals("Change of prime meridian.", getScope(c), "scope");
- assertEquals("IGN-Fra", c.getOperationVersion().get(),
"operationVersion");
+ assertEquals("IGN-Fra", c.getOperationVersion(), "operationVersion");
final OperationMethod method = c.getMethod();
assertNotNull(method, "method");
diff --git a/geoapi/snapshot b/geoapi/snapshot
index 725c585a09..32cfb0099f 160000
--- a/geoapi/snapshot
+++ b/geoapi/snapshot
@@ -1 +1 @@
-Subproject commit 725c585a097b2d169d5bb022c2d960961685bfd4
+Subproject commit 32cfb0099f9fc752e39e4d1f25c2a59ac4c909ed