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 bb2667a64da4129993fdebc5f6513ed6e5b7cff9
Author: Martin Desruisseaux <martin.desruisse...@geomatys.com>
AuthorDate: Thu Aug 1 18:24:56 2024 +0200

    Minor clarifications in Javadoc about a caller's responsibility.
---
 .../main/org/apache/sis/coverage/grid/GridDerivation.java           | 1 +
 .../org/apache/sis/storage/geotiff/writer/CompressionChannel.java   | 6 ++++--
 .../main/org/apache/sis/storage/geotiff/writer/PixelChannel.java    | 1 +
 .../org/apache/sis/storage/geotiff/writer/PredictorChannel.java     | 1 +
 .../main/org/apache/sis/storage/geotiff/writer/ZIP.java             | 1 +
 5 files changed, 8 insertions(+), 2 deletions(-)

diff --git 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
index 8e4383a805..c46ec97aa7 100644
--- 
a/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
+++ 
b/endorsed/src/org.apache.sis.feature/main/org/apache/sis/coverage/grid/GridDerivation.java
@@ -667,6 +667,7 @@ public class GridDerivation {
                 resolution = ArraysExt.resize(resolution, 
cornerToCRS.getTargetDimensions());
                 Matrix affine = cornerToCRS.derivative(new 
DirectPositionView.Double(getPointOfInterest()));
                 final double[] subsampling = 
Matrices.inverse(affine).multiply(resolution);
+                @SuppressWarnings("LocalVariableHidesMemberVariable")
                 final int[] modifiedDimensions = this.modifiedDimensions;      
             // Will not change anymore.
                 boolean scaled = false;
                 for (int k=0; k < subsampling.length; k++) {
diff --git 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/CompressionChannel.java
 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/CompressionChannel.java
index a5c2de71ad..b770237f6e 100644
--- 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/CompressionChannel.java
+++ 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/CompressionChannel.java
@@ -75,9 +75,11 @@ abstract class CompressionChannel extends PixelChannel {
 
     /**
      * Creates a buffer to use with this compression channel.
-     * The default implementation creates a buffer on heap,
+     * The byte order shall be set by the caller.
+     *
+     * <p>The default implementation creates a buffer on heap,
      * which is suitable for decompression implemented in Java.
-     * Decompression implemented by native libraries may prefer direct buffer.
+     * Decompression implemented by native libraries may prefer direct 
buffer.</p>
      */
     @Override
     ByteBuffer createBuffer() {
diff --git 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PixelChannel.java
 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PixelChannel.java
index 2d4d725a28..52b574fc5f 100644
--- 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PixelChannel.java
+++ 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PixelChannel.java
@@ -47,6 +47,7 @@ abstract class PixelChannel implements WritableByteChannel {
      * Creates a buffer to use with this compression channel.
      * The buffer size, and whether the buffer should be direct or not,
      * depends on the decompression implementation.
+     * The byte order shall be set by the caller.
      */
     abstract ByteBuffer createBuffer();
 
diff --git 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PredictorChannel.java
 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PredictorChannel.java
index 8940faf7e6..13502fbc8b 100644
--- 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PredictorChannel.java
+++ 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/PredictorChannel.java
@@ -50,6 +50,7 @@ abstract class PredictorChannel extends PixelChannel {
 
     /**
      * Creates a buffer to use with this compression channel.
+     * The byte order shall be set by the caller.
      */
     @Override
     final ByteBuffer createBuffer() {
diff --git 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/ZIP.java
 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/ZIP.java
index f06aef2ca9..291877e50c 100644
--- 
a/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/ZIP.java
+++ 
b/endorsed/src/org.apache.sis.storage.geotiff/main/org/apache/sis/storage/geotiff/writer/ZIP.java
@@ -48,6 +48,7 @@ final class ZIP extends CompressionChannel {
 
     /**
      * Creates a buffer to use with this compression channel.
+     * The byte order shall be set by the caller.
      */
     @Override
     final ByteBuffer createBuffer() {

Reply via email to