sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject [sis] 01/04: Fix an ineffective verification.
Date Mon, 03 Aug 2020 17:26:52 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 639ab2906a6ec7527b2e9d017301916db5b026c9
Author: Martin Desruisseaux <martin.desruisseaux@geomatys.com>
AuthorDate: Mon Aug 3 11:45:57 2020 +0200

    Fix an ineffective verification.
---
 .../main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
index 0df7a8c..f6b97a2 100644
--- a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
+++ b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/BufferedGridCoverage.java
@@ -117,8 +117,8 @@ public class BufferedGridCoverage extends GridCoverage {
          */
         final int numBands = range.size();
         final int numBanks = data.getNumBanks();
-        if (numBanks != 1 && numBands != numBands) {
-            throw new IllegalArgumentException(Resources.format(Resources.Keys.MismatchedBandCount_2,
numBands, numBands));
+        if (numBanks != 1 && numBanks != numBands) {
+            throw new IllegalArgumentException(Resources.format(Resources.Keys.MismatchedBandCount_2,
numBanks, numBands));
         }
         /*
          * Verify that the buffer has enough elements for all cells in grid extent.


Mime
View raw message