sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/03: Minor documentation fixes.
Date Wed, 07 Jul 2021 09:53:01 GMT
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 2c9789d1f562b5879a690ff596519b9700c56063
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Tue Jul 6 21:27:00 2021 +0200

    Minor documentation fixes.
---
 .../sis/metadata/iso/content/DefaultFeatureTypeInfo.java   |  2 +-
 .../org/apache/sis/internal/system/DelayedExecutor.java    |  3 ++-
 .../src/main/java/org/apache/sis/util/Numbers.java         |  3 ++-
 storage/sis-netcdf/pom.xml                                 | 14 +++++++-------
 .../org/apache/sis/internal/storage/MetadataBuilder.java   |  4 +++-
 .../sis/internal/storage/xml/stream/StaxStreamReader.java  |  6 +++---
 6 files changed, 18 insertions(+), 14 deletions(-)

diff --git a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
index 288f1bb..d772e84 100644
--- a/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
+++ b/core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/content/DefaultFeatureTypeInfo.java
@@ -175,7 +175,7 @@ public class DefaultFeatureTypeInfo extends ISOMetadata implements FeatureTypeIn
      * Sets a new number of occurrence of feature instances for this feature types.
      *
      * @param  newValue  the new number of occurrence.
-     * @throws IllegalArgumentException if the given value is negative.
+     * @throws IllegalArgumentException if the given value is zero or negative.
      */
     public void setFeatureInstanceCount(final Integer newValue) {
         checkWritePermission(featureInstanceCount);
diff --git a/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
b/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
index f5e2911..edf9efc 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/internal/system/DelayedExecutor.java
@@ -63,7 +63,8 @@ public final class DelayedExecutor extends DaemonThread {
      * Schedules the given short task for later execution in a daemon thread.
      * The task will be executed after the delay specified by {@link DelayedRunnable#getDelay(TimeUnit)}
      * The task must completes quickly, because we will typically use only one thread for
all submitted tasks.
-     * Completion of the task shall not be critical, since the JVM is allowed to shutdown
before task completion.
+     * Completion of the task shall not be of critical importance, because the JVM is allowed
to shutdown
+     * before task completion.
      *
      * @param  task  the task to schedule for later execution.
      */
diff --git a/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java b/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
index a3f4712..2f60997 100644
--- a/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
+++ b/core/sis-utility/src/main/java/org/apache/sis/util/Numbers.java
@@ -555,7 +555,8 @@ public final class Numbers extends Static {
      * @param  type    the destination type.
      * @return the number casted to the given type, or {@code null} if the given value was
null.
      * @throws IllegalArgumentException if the given type is not supported by this {@code
Numbers} class,
-     *         or the type is {@link #FRACTION} and the given number can not be converted
to that type.
+     *         or the number can not be converted to the specified type (e.g. {@link Double#NaN}
can not
+     *         be converted to {@link BigDecimal}).
      */
     @SuppressWarnings("unchecked")
     public static <N extends Number> N cast(final Number number, final Class<N>
type) throws IllegalArgumentException {
diff --git a/storage/sis-netcdf/pom.xml b/storage/sis-netcdf/pom.xml
index 8aba4e2..c6e6440 100644
--- a/storage/sis-netcdf/pom.xml
+++ b/storage/sis-netcdf/pom.xml
@@ -130,6 +130,13 @@
       <scope>test</scope>
     </dependency>
     <dependency>
+      <groupId>org.apache.sis.storage</groupId>
+      <artifactId>sis-storage</artifactId>
+      <version>${project.version}</version>
+      <type>test-jar</type>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
       <groupId>org.apache.sis.core</groupId>
       <artifactId>sis-metadata</artifactId>
       <version>${project.version}</version>
@@ -141,13 +148,6 @@
       <artifactId>slf4j-jdk14</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.sis.storage</groupId>
-      <artifactId>sis-storage</artifactId>
-      <version>${project.version}</version>
-      <type>test-jar</type>
-      <scope>test</scope>
-    </dependency>
   </dependencies>
 
   <!--  UCAR repository from which to download the netCDF library. -->
diff --git a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
index 1e52c28..ab352c0 100644
--- a/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
+++ b/storage/sis-storage/src/main/java/org/apache/sis/internal/storage/MetadataBuilder.java
@@ -151,6 +151,7 @@ import org.opengis.metadata.citation.Responsibility;
  * @author  Martin Desruisseaux (Geomatys)
  * @author  Rémi Maréchal (Geomatys)
  * @author  Thi Phuong Hao Nguyen (VNSC)
+ * @author  Alexis Manin (Geomatys)
  * @version 1.1
  * @since   0.8
  * @module
@@ -1893,7 +1894,8 @@ parse:      for (int i = 0; i < length;) {
             final GenericName name = type.getName();
             if (name != null) {
                 final DefaultFeatureTypeInfo info = new DefaultFeatureTypeInfo(name);
-                /* Warning: Exclude 0 as valid instance count.
+                /*
+                 * Note: Exclude 0 as valid instance count.
                  * Reason: ISO-19115 consider 0 (empty dataset) as an invalid count. However,
in practice, it can happen
                  * to open data sources that contain no record. They're still valid datasets,
because as long as their
                  * structure is valid, there's no point in raising an error (at our level,
without any other context
diff --git a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
index c526216..670958b 100644
--- a/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
+++ b/storage/sis-xmlstore/src/main/java/org/apache/sis/internal/storage/xml/stream/StaxStreamReader.java
@@ -204,7 +204,7 @@ public abstract class StaxStreamReader extends StaxStreamIO implements
XMLStream
      * until the end of the given element exclusive. Nested elements of the same name, if
any, will be
      * ignored.
      *
-     * @param  tagName name of the tag to close.
+     * @param  tagName  name of the tag to close.
      * @return a reader over a portion of the stream.
      * @throws XMLStreamException if this XML reader has been closed.
      */
@@ -234,7 +234,7 @@ public abstract class StaxStreamReader extends StaxStreamIO implements
XMLStream
     }
 
     /**
-     * Moves the cursor the the first start element and verifies that it is the expected
element.
+     * Moves the cursor to the first start element and verifies that it is the expected element.
      * This method is useful for skipping comments, entity declarations, <i>etc.</i>
before the root element.
      *
      * <p>If the reader is already on a start element, then this method does not move
forward.
@@ -269,7 +269,7 @@ public abstract class StaxStreamReader extends StaxStreamIO implements
XMLStream
      * <p>The current event when this method is invoked must be {@link #START_ELEMENT}.
      * After this method invocation, the current event will be {@link #END_ELEMENT}.</p>
      *
-     * @param  tagName name of the tag to close.
+     * @param  tagName  name of the tag to close.
      * @throws EOFException if end tag could not be found.
      * @throws XMLStreamException if an error occurred while reading the XML stream.
      */

Mime
View raw message