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
The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
new 30a4a3568c Fix minor errors identified during the merge.
30a4a3568c is described below
commit 30a4a3568ccb2570f242c116c0bbc253dd296b3a
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Sun Oct 6 19:23:05 2024 +0200
Fix minor errors identified during the merge.
---
.../apache/sis/buildtools/coding/ReorganizeImports.java | 4 +++-
.../apache/sis/referencing/internal/EPSGFactoryProxy.java | 15 +++------------
.../operation/CoordinateOperationRegistry.java | 2 +-
3 files changed, 7 insertions(+), 14 deletions(-)
diff --git
a/buildSrc/src/main/java/org/apache/sis/buildtools/coding/ReorganizeImports.java
b/buildSrc/src/main/java/org/apache/sis/buildtools/coding/ReorganizeImports.java
index c7e46b9cbd..ed067a7c6a 100644
---
a/buildSrc/src/main/java/org/apache/sis/buildtools/coding/ReorganizeImports.java
+++
b/buildSrc/src/main/java/org/apache/sis/buildtools/coding/ReorganizeImports.java
@@ -147,7 +147,6 @@ public final class ReorganizeImports extends
SimpleFileVisitor<Path> {
"org.junit",
"org.opentest4j",
"org.opengis.test",
- "org.apache.sis.image.TiledImageMock",
"org.apache.sis.referencing.cs.HardCodedAxes",
"org.apache.sis.referencing.cs.HardCodedCS",
"org.apache.sis.referencing.crs.HardCodedCRS",
@@ -456,6 +455,9 @@ public final class ReorganizeImports extends
SimpleFileVisitor<Path> {
if (element.regionMatches(element.lastIndexOf('.')+1, "Test",
0, 4)) {
return true;
}
+ if (element.endsWith("Mock")) {
+ return true;
+ }
if (element.contains("Assert") &&
!element.contains("ArgumentCheckByAssertion")) {
return true;
}
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java
index 1aaced7e15..84417aee45 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/internal/EPSGFactoryProxy.java
@@ -22,7 +22,6 @@ import org.opengis.referencing.AuthorityFactory;
import org.opengis.referencing.IdentifiedObject;
import org.opengis.util.FactoryException;
import org.opengis.util.InternationalString;
-import org.apache.sis.referencing.GeodeticException;
// Specific to the geoapi-3.1 and geoapi-4.0 branches:
import java.util.Optional;
@@ -43,21 +42,13 @@ public abstract class EPSGFactoryProxy implements
AuthorityFactory {
abstract AuthorityFactory factory() throws FactoryException;
@Override
- public final Citation getAuthority() {
- try {
- return factory().getAuthority();
- } catch (FactoryException e) {
- throw new GeodeticException(e);
- }
+ public final Citation getAuthority() throws FactoryException {
+ return factory().getAuthority();
}
@Override
public final Citation getVendor() throws FactoryException {
- try {
- return factory().getVendor();
- } catch (FactoryException e) {
- throw new GeodeticException(e);
- }
+ return factory().getVendor();
}
@Override
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
index 35a95e6a39..9e28cbd912 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/CoordinateOperationRegistry.java
@@ -328,8 +328,8 @@ class CoordinateOperationRegistry {
? IdentifiedObjectFinder.Domain.EXHAUSTIVE_VALID_DATASET
: IdentifiedObjectFinder.Domain.VALID_DATASET);
int matchCount = 0;
- final Citation authority = registry.getAuthority();
try {
+ final Citation authority = registry.getAuthority();
for (final IdentifiedObject candidate : codeFinder.find(crs)) {
final Identifier identifier =
IdentifiedObjects.getIdentifier(candidate, authority);
if (identifier != null) {