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 5283b04479ef78eff70c08ba96e85817f0c0e0c0 Author: Martin Desruisseaux <martin.desruisse...@geomatys.com> AuthorDate: Tue Apr 18 20:24:33 2023 +0200 Typo fix: expansive → expensive --- .../java/org/apache/sis/internal/setup/Inflater.java | 6 +++--- .../main/java/org/apache/sis/image/Visualization.java | 2 +- .../org/apache/sis/internal/feature/GeometryWithCRS.java | 2 +- .../apache/sis/internal/feature/j2d/PointWrapper.java | 4 ++-- .../apache/sis/internal/feature/j2d/ShapeWrapper.java | 12 ++++++------ .../org/apache/sis/internal/feature/j2d/Wrapper.java | 6 +++--- .../sis/internal/feature/jts/FilteringContext.java | 2 +- .../java/org/apache/sis/internal/feature/jts/JTS.java | 4 ++-- .../java/org/apache/sis/internal/metadata/Merger.java | 6 ++++-- .../java/org/apache/sis/metadata/iso/extent/Extents.java | 2 +- .../org/apache/sis/portrayal/TransformChangeEvent.java | 2 +- .../org/apache/sis/referencing/cs/CoordinateSystems.java | 2 +- .../operation/transform/SpecializableTransform.java | 2 +- .../src/main/java/org/apache/sis/math/Fraction.java | 16 ++++++++-------- 14 files changed, 35 insertions(+), 33 deletions(-) diff --git a/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/Inflater.java b/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/Inflater.java index 042451f766..88e74a9ba9 100644 --- a/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/Inflater.java +++ b/application/sis-javafx/src/main/java/org/apache/sis/internal/setup/Inflater.java @@ -31,9 +31,9 @@ import javax.swing.JProgressBar; /** * Decompress the ZIP file for JavaFX in a background thread. * - * <p><b>Design note:</b> we do not use {@link javax.swing.SwingWorker} because that classes - * is more expansive than what we need. For example, it creates a pool of 10 threads while we - * need only one.</p> + * <h2>Design note</h2> + * We do not use {@link javax.swing.SwingWorker} because that classes is more expensive + * than what we need. For example, it creates a pool of 10 threads while we need only one. * * @author Martin Desruisseaux (Geomatys) * @version 1.1 diff --git a/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java b/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java index 7305d66d7e..aedb0fcdfb 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java +++ b/core/sis-feature/src/main/java/org/apache/sis/image/Visualization.java @@ -526,7 +526,7 @@ final class Visualization extends ResampledImage { @Override protected Raster computeTile(final int tileX, final int tileY, WritableRaster tile) throws TransformException { if (converters == null) try { - // Most expansive operation (resampling + conversion). + // Most expensive operation (resampling + conversion). return super.computeTile(tileX, tileY, tile); } catch (BackingStoreException e) { throw e.unwrapOrRethrow(TransformException.class); diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryWithCRS.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryWithCRS.java index 4216eae572..157c5e1c1e 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryWithCRS.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/GeometryWithCRS.java @@ -78,7 +78,7 @@ public abstract class GeometryWithCRS<G> extends GeometryWrapper<G> { public final boolean isSameCRS(final GeometryWrapper<G> other) { /* * Identity comparison is often sufficient since all geometries typically share the same CRS. - * If they are not the same instance, a more expansive `equalsIgnoreMetadata(…)` method here + * If they are not the same instance, a more expensive `equalsIgnoreMetadata(…)` method here * would probably duplicate the work done later by the `transform(Geometry, …)` method. */ return crs == ((GeometryWithCRS<G>) other).crs; diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/PointWrapper.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/PointWrapper.java index 37a8fd710c..7a8369092d 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/PointWrapper.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/PointWrapper.java @@ -221,7 +221,7 @@ final class PointWrapper extends GeometryWithCRS<Shape> { /** * Estimates whether the wrapped geometry is contained by the geometry of the given wrapper. * This method may conservatively returns {@code false} if an accurate computation would be - * too expansive. + * too expensive. * * @param wrapper instance of {@link Wrapper}. */ @@ -232,7 +232,7 @@ final class PointWrapper extends GeometryWithCRS<Shape> { /** * Estimates whether the wrapped geometry intersects the geometry of the given wrapper. * This method may conservatively returns {@code true} if an accurate computation would - * be too expansive. + * be too expensive. * * @param wrapper instance of {@link Wrapper} or {@link PointWrapper}. * @throws ClassCastException if the given object is not a recognized wrapper. diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/ShapeWrapper.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/ShapeWrapper.java index e08a665eef..57a0ca32fb 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/ShapeWrapper.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/ShapeWrapper.java @@ -66,7 +66,7 @@ abstract class ShapeWrapper extends AbstractShape implements Serializable { /** * Returns a rectangle that completely encloses this {@code Shape}. * This is not necessarily the smallest bounding box if an accurate - * computation would be too expansive. + * computation would be too expensive. * * @return a rectangle that completely encloses this {@code Shape}. */ @@ -78,7 +78,7 @@ abstract class ShapeWrapper extends AbstractShape implements Serializable { /** * Returns a rectangle that completely encloses this {@code Shape}. * This is not necessarily the smallest bounding box if an accurate - * computation would be too expansive. + * computation would be too expensive. * * @return a rectangle that completely encloses this {@code Shape}. */ @@ -112,7 +112,7 @@ abstract class ShapeWrapper extends AbstractShape implements Serializable { /** * Tests if the interior of this {@code Shape} intersects the interior of a specified rectangular area. - * This method may conservatively return {@code true} if an accurate computation would be too expansive. + * This method may conservatively return {@code true} if an accurate computation would be too expensive. * * @param x minimal <var>x</var> coordinate of the rectangle. * @param y minimal <var>y</var> coordinate of the rectangle. @@ -127,7 +127,7 @@ abstract class ShapeWrapper extends AbstractShape implements Serializable { /** * Tests if the interior of this {@code Shape} intersects the interior of a specified rectangular area. - * This method may conservatively return {@code true} if an accurate computation would be too expansive. + * This method may conservatively return {@code true} if an accurate computation would be too expensive. * * @param r the rectangular area to test. * @return whether the specified rectangle intersects the interior of this shape. @@ -139,7 +139,7 @@ abstract class ShapeWrapper extends AbstractShape implements Serializable { /** * Tests if the interior of this {@code Shape} entirely contains the interior of a specified rectangular area. - * This method may conservatively return {@code false} if an accurate computation would be too expansive. + * This method may conservatively return {@code false} if an accurate computation would be too expensive. * * @param x minimal <var>x</var> coordinate of the rectangle. * @param y minimal <var>y</var> coordinate of the rectangle. @@ -154,7 +154,7 @@ abstract class ShapeWrapper extends AbstractShape implements Serializable { /** * Tests if the interior of this {@code Shape} entirely contains the interior of a specified rectangular area. - * This method may conservatively return {@code false} if an accurate computation would be too expansive. + * This method may conservatively return {@code false} if an accurate computation would be too expensive. * * @param r the rectangular area to test. * @return whether the specified rectangle entirely contains the interior of this shape. diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Wrapper.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Wrapper.java index 42014eb964..8b545d752e 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Wrapper.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/j2d/Wrapper.java @@ -340,7 +340,7 @@ add: for (;;) { /** * Estimates whether the wrapped geometry is contained by the geometry of the given wrapper. * This method may conservatively returns {@code false} if an accurate computation would be - * too expansive. + * too expensive. * * @param wrapper instance of {@link Wrapper}. */ @@ -355,7 +355,7 @@ add: for (;;) { /** * Estimates whether the wrapped geometry contains the geometry of the given wrapper. * This method may conservatively returns {@code false} if an accurate computation would - * be too expansive. + * be too expensive. * * @param wrapper instance of {@link Wrapper} or {@link PointWrapper}. * @throws ClassCastException if the given object is not a recognized wrapper. @@ -371,7 +371,7 @@ add: for (;;) { /** * Estimates whether the wrapped geometry intersects the geometry of the given wrapper. * This method may conservatively returns {@code true} if an accurate computation would - * be too expansive. + * be too expensive. * * @param wrapper instance of {@link Wrapper} or {@link PointWrapper}. * @throws ClassCastException if the given object is not a recognized wrapper. diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/FilteringContext.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/FilteringContext.java index 831396e8f5..8588980441 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/FilteringContext.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/FilteringContext.java @@ -72,7 +72,7 @@ final class FilteringContext { /* * Unconditionally dispose all writers after 2 minutes, no matter if some threads * still need writers or not. The intent is to avoid retention of large buffers. - * WKB writer are not so expansive to creates, so recreating them every 2 minutes + * WKB writer are not so expensive to creates, so recreating them every 2 minutes * should not have a visible impact on performance. */ if (WRITERS.add(writer) && CLEANER_REGISTERED.compareAndSet(false, true)) { diff --git a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/JTS.java b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/JTS.java index 392e087ef6..75a8083777 100644 --- a/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/JTS.java +++ b/core/sis-feature/src/main/java/org/apache/sis/internal/feature/jts/JTS.java @@ -71,7 +71,7 @@ public final class JTS extends Static { /** * Returns {@code true} if the two geometries use the same CRS, based on very cheap comparison. * A value of {@code false} does not necessarily means that the CRS are different, but it means - * that a more expansive comparison is required. If CRS are specified by SRID codes, then this + * that a more expensive comparison is required. If CRS are specified by SRID codes, then this * method assumes that the two SRID codes are defined by the same authority (e.g. EPSG). * * <p>If both CRS are undefined (null), then they are considered the same.</p> @@ -88,7 +88,7 @@ public final class JTS extends Static { } /* * Identity comparison is often sufficient since all geometries typically share the same CRS. - * If they are not the same instance, a more expansive `equalsIgnoreMetadata(…)` method here + * If they are not the same instance, a more expensive `equalsIgnoreMetadata(…)` method here * would probably duplicate the work done later by the `transform(Geometry, …)` method. */ Object c1 = first.getUserData(); diff --git a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java index 772a53b9d9..a15630c809 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/internal/metadata/Merger.java @@ -248,8 +248,10 @@ distribute: while (it.hasNext()) { if (old instanceof Collection<?>) { final Collection<?> oldList = (Collection<?>) old; if (oldList.size() <= targetList.size()) { - // Above was only a cheap check based on collection size only. - // Below is a more expansive check if assertions are enabled. + /* + * Above was only a cheap check based on collection size only. + * Below is a more expensive check if assertions are enabled. + */ assert targetList.containsAll(oldList) : propertyName; continue; } diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java index 764e3c6fe0..12bf524a87 100644 --- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java +++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/extent/Extents.java @@ -208,7 +208,7 @@ public final class Extents extends Static { /** * Returns a single geographic bounding box from the specified extent. * This method tries to find the bounding box in the cheapest way - * before to fallback on more expansive computations: + * before to fallback on more expensive computations: * * <ol> * <li>First, this method searches geographic elements that are instance of {@link GeographicBoundingBox}.<ul> diff --git a/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/TransformChangeEvent.java b/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/TransformChangeEvent.java index e71e2e5429..a69ff3591b 100644 --- a/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/TransformChangeEvent.java +++ b/core/sis-portrayal/src/main/java/org/apache/sis/portrayal/TransformChangeEvent.java @@ -104,7 +104,7 @@ public class TransformChangeEvent extends PropertyChangeEvent { * A relative interim change has been applied but is not yet reflected in the "objective to display" transform. * This kind of change is not fired by {@link PlanarCanvas} but may be fired by subclasses such as * {@link org.apache.sis.gui.map.MapCanvas}. That class provides immediate feedback to users - * with a temporary visual change before to perform more expansive rendering in background. + * with a temporary visual change before to perform more expensive rendering in background. */ INTERIM; diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java index 871745bda0..f734272ca4 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/cs/CoordinateSystems.java @@ -366,7 +366,7 @@ next: for (final CoordinateSystem cs : targets) { ArgumentChecks.ensureNonNull("sourceCS", sourceCS); ArgumentChecks.ensureNonNull("targetCS", targetCS); if (!Classes.implementSameInterfaces(sourceCS.getClass(), targetCS.getClass(), CoordinateSystem.class)) { - // Above line was a relatively cheap test. Try the more expansive test below only if necessary. + // Above line was a relatively cheap test. Try the more expensive test below only if necessary. if (!hasAllTargetTypes(sourceCS, targetCS)) { throw new IllegalArgumentException(Resources.format(Resources.Keys.IncompatibleCoordinateSystemTypes)); } diff --git a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SpecializableTransform.java b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SpecializableTransform.java index b15a47c206..818d59c19a 100644 --- a/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SpecializableTransform.java +++ b/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/SpecializableTransform.java @@ -336,7 +336,7 @@ class SpecializableTransform extends AbstractMathTransform implements Serializab do { // Count how many points will use that transform. src.offset += srcInc; if (--numPts <= 0) break; - domain = locate(src); // More expansive check than the case where domain is non-null. + domain = locate(src); // More expensive check than the case where domain is non-null. } while (domain == null); } else { RTreeNode next = domain; diff --git a/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java b/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java index 5805c1ac5d..3b1ded1fb7 100644 --- a/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java +++ b/core/sis-utility/src/main/java/org/apache/sis/math/Fraction.java @@ -93,17 +93,17 @@ public final class Fraction extends Number implements Comparable<Fraction>, Seri * such as {@link #doubleValue()} is equal to the given value in the sense of {@link Double#equals(Object)}: * infinities, positive and negative zeros are preserved, but various NaN values are collapsed to a single NaN value. * - * <div class="note"><b>Design note:</b> - * this method does not return approximated values because it is difficult to choose which fraction is best. + * <p>This method accepts only values between {@value Integer#MIN_VALUE} and {@value Integer#MAX_VALUE} inclusive, + * i.e. values in the range of 32-bits integers. If the given value has fraction digits, then the validity range + * will be smaller depending on the {@linkplain #denominator} required for representing that value.</p> + * + * <h4>Design note</h4> + * This method does not return approximated values because it is difficult to choose which fraction is best. * For example, choosing an approximated fraction for π value is quite arbitrary, and searching the fraction - * closer than any other fraction representable by this class is computationally expansive. + * closer than any other fraction representable by this class is computationally expensive. * Even with common fractions, the algorithm currently implemented in this class can detect that 1.6666666666666667 * {@linkplain Double#equals(Object) is equal to} 5⁄3 but cannot detect easily that 1.66666666666666 (same number - * with two decimal digits dropped) is close to 5⁄3.</div> - * - * This method accepts only values between {@value Integer#MIN_VALUE} and {@value Integer#MAX_VALUE} inclusive, - * i.e. values in the range of 32-bits integers. If the given value has fraction digits, then the validity range - * will be smaller depending on the {@linkplain #denominator} required for representing that value. + * with two decimal digits dropped) is close to 5⁄3. * * @param value the double-precision value to convert to a fraction. * @return a fraction such as {@link #doubleValue()} is equal to the given value.