You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2025/07/28 13:50:07 UTC
(sis) 01/02: Rename a internal method which had a confusing name. Also fix a spelling error.
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 a7d63bfe94a7f8ff4589531e8983928d2892be7d
Author: Martin Desruisseaux <ma...@geomatys.com>
AuthorDate: Sun Jul 27 20:11:13 2025 +0200
Rename a internal method which had a confusing name.
Also fix a spelling error.
---
.../main/org/apache/sis/metadata/MetadataStandard.java | 2 +-
.../main/org/apache/sis/metadata/MetadataVisitor.java | 2 +-
.../main/org/apache/sis/metadata/TreeTableView.java | 2 +-
.../main/org/apache/sis/metadata/sql/Dispatcher.java | 2 +-
.../main/org/apache/sis/referencing/AbstractIdentifiedObject.java | 2 +-
.../main/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java | 2 +-
.../main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java | 2 +-
.../apache/sis/referencing/operation/CoordinateOperationRegistry.java | 2 +-
.../test/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java | 2 +-
.../operation/transform/InterpolatedGeocentricTransformTest.java | 2 +-
.../main/org/apache/sis/storage/geotiff/Reader.java | 2 +-
.../org.apache.sis.util/main/org/apache/sis/math/DecimalFunctions.java | 2 +-
.../src/org.apache.sis.util/main/org/apache/sis/system/Semaphores.java | 2 +-
13 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataStandard.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataStandard.java
index a4b418d2a0..2948efd9c6 100644
--- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataStandard.java
+++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataStandard.java
@@ -1094,7 +1094,7 @@ public class MetadataStandard implements Serializable {
return accessor.equals(metadata1, metadata2, mode);
} finally {
inProgress.remove(pair);
- Semaphores.clear(Semaphores.NULL_COLLECTION, allowNull);
+ Semaphores.clearIfFalse(Semaphores.NULL_COLLECTION, allowNull);
}
} else {
/*
diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataVisitor.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataVisitor.java
index e4eaafc7ab..516fd20f62 100644
--- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataVisitor.java
+++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/MetadataVisitor.java
@@ -199,7 +199,7 @@ abstract class MetadataVisitor<R> {
* We are back to the root metadata (i.e. we finished walking through all children).
* Clear thread local variables, which should restore them to their initial value.
*/
- Semaphores.clear(Semaphores.NULL_COLLECTION, allowNull);
+ Semaphores.clearIfFalse(Semaphores.NULL_COLLECTION, allowNull);
final ThreadLocal<? extends MetadataVisitor<?>> creator = creator();
if (creator != null) creator.remove();
}
diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/TreeTableView.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/TreeTableView.java
index 4ef7dd864e..d653ab5a26 100644
--- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/TreeTableView.java
+++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/TreeTableView.java
@@ -153,7 +153,7 @@ final class TreeTableView implements TreeTable, TreeFormatCustomization, Seriali
return MetadataFormat.INSTANCE.format(this);
}
} finally {
- Semaphores.clear(Semaphores.NULL_COLLECTION, allowNull);
+ Semaphores.clearIfFalse(Semaphores.NULL_COLLECTION, allowNull);
}
}
diff --git a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java
index d329d38869..47329a4302 100644
--- a/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java
+++ b/endorsed/src/org.apache.sis.metadata/main/org/apache/sis/metadata/sql/Dispatcher.java
@@ -275,7 +275,7 @@ final class Dispatcher implements InvocationHandler {
}
}
} finally {
- Semaphores.clear(Semaphores.NULL_COLLECTION, allowNull);
+ Semaphores.clearIfFalse(Semaphores.NULL_COLLECTION, allowNull);
}
}
if (value == null) {
diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java
index aefc4a31d1..f96874251d 100644
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/AbstractIdentifiedObject.java
@@ -1169,7 +1169,7 @@ public class AbstractIdentifiedObject extends FormattableObject implements Ident
* An alternative approach could be to use an ArrayList and replace it by an unmodifiable
* list only after unmarshalling (using an afterUnmarshal(Unmarshaller, Object) method),
* but we want to avoid Unmarshaller dependency (for reducing classes loading for users
- * who are not interrested in XML) and it may actually be less efficient for the vast
+ * who are not interested in XML) and it may actually be less efficient for the vast
* majority of cases where there is less than 3 aliases.
*/
final int size = alias.size();
diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
index 75daa4bc2f..2af9d2d64d 100644
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/IdentifiedObjectFinder.java
@@ -526,7 +526,7 @@ public class IdentifiedObjectFinder {
} catch (BackingStoreException e) {
throw e.unwrapOrRethrow(FactoryException.class);
} finally {
- Semaphores.clear(Semaphores.FINER_OBJECT_CREATION_LOGS, finer);
+ Semaphores.clearIfFalse(Semaphores.FINER_OBJECT_CREATION_LOGS, finer);
}
return result;
}
diff --git a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
index 3a3a7c121b..fc72ab8873 100644
--- a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
+++ b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/factory/sql/EPSGDataAccess.java
@@ -1666,7 +1666,7 @@ search: try (ResultSet result = executeMetadataQuery("Deprecation",
return factory.createDerivedCRS(metadata, baseCRS, fromBase, cs);
}
} finally {
- Semaphores.clear(Semaphores.SUSPEND_PARAMETER_CHECK, old);
+ Semaphores.clearIfFalse(Semaphores.SUSPEND_PARAMETER_CHECK, old);
}
};
break;
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 7057a47522..a53de1e800 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
@@ -634,7 +634,7 @@ class CoordinateOperationRegistry {
throw exception.unwrapOrRethrow(FactoryException.class);
}
} finally {
- Semaphores.clear(Semaphores.METADATA_ONLY, mdOnly);
+ Semaphores.clearIfFalse(Semaphores.METADATA_ONLY, mdOnly);
}
}
}
diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
index 0618af7057..374c984c92 100644
--- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
+++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/datum/DefaultGeodeticDatumTest.java
@@ -147,7 +147,7 @@ public final class DefaultGeodeticDatumTest extends TestCase {
/*
* Associate two BursaWolfParameters, one valid only in a local area and the other one
* valid globaly. Note that we are building an invalid set of parameters, because the
- * source datum are not the same in both case. But for this test we are not interrested
+ * source datum are not the same in both case. But for this test we are not interested
* in datum consistency - we only want any Bursa-Wolf parameters having different area
* of validity.
*/
diff --git a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java
index 513ef76693..5e41850d3a 100644
--- a/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java
+++ b/endorsed/src/org.apache.sis.referencing/test/org/apache/sis/referencing/operation/transform/InterpolatedGeocentricTransformTest.java
@@ -79,7 +79,7 @@ public class InterpolatedGeocentricTransformTest extends MathTransformTestCase {
*/
@Test
public void testForwardTransform() throws FactoryException, TransformException {
- createGeodeticTransformation(); // Create the inverse of the transform we are interrested in.
+ createGeodeticTransformation(); // Create the inverse of the transform we are interested in.
transform = transform.inverse();
isInverseTransformSupported = false;
verifyTransform(FranceGeocentricInterpolationTest.samplePoint(3),
diff --git a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/Reader.java b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/Reader.java
index 0c61acaca9..7a838577a0 100644
--- a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/Reader.java
+++ b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/Reader.java
@@ -266,7 +266,7 @@ final class Reader extends IOBase {
nextIFD = 0; // Prevent trying other IFD if we fail to read this one.
/*
* Design note: we parse the Image File Directory entry now because even if we were
- * not interrested in that IFD, we need to go anyway after its last record in order
+ * not interested in that IFD, we need to go anyway after its last record in order
* to get the pointer to the next IFD.
*/
final int offsetSize = Integer.BYTES << intSizeExpansion;
diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/DecimalFunctions.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/DecimalFunctions.java
index fa97b330bf..adf4e5d49b 100644
--- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/DecimalFunctions.java
+++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/math/DecimalFunctions.java
@@ -252,7 +252,7 @@ public final class DecimalFunctions extends Static {
double cs = Math.scalb(pow10(e10 - 1), e + PRECISION); // Range: (0.1 × 2^56 … 2^56) exclusive.
/*
* This is where magic happen: the following multiplication overflow (we would need a 128 bits integer
- * for representing it), but we don't care because we are interrested only in the fraction digits (the
+ * for representing it), but we don't care because we are interested only in the fraction digits (the
* 56 lower bits because of the scaling discussed in previous comment). In integer arithmetic, the low
* bits are always valid even if the multiplication overflow.
*/
diff --git a/endorsed/src/org.apache.sis.util/main/org/apache/sis/system/Semaphores.java b/endorsed/src/org.apache.sis.util/main/org/apache/sis/system/Semaphores.java
index 3e3c6642b9..48f1a19416 100644
--- a/endorsed/src/org.apache.sis.util/main/org/apache/sis/system/Semaphores.java
+++ b/endorsed/src/org.apache.sis.util/main/org/apache/sis/system/Semaphores.java
@@ -140,7 +140,7 @@ public final class Semaphores {
* @param flag one of {@link #CONVERSION_AND_CRS}, {@link #ENCLOSED_IN_OPERATION} or other constants.
* @param previous value returned by {@link #queryAndSet(int)}.
*/
- public static void clear(final int flag, final boolean previous) {
+ public static void clearIfFalse(final int flag, final boolean previous) {
if (!previous) {
clear(flag);
}