sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jso...@apache.org
Subject svn commit: r1798897 - /sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
Date Fri, 16 Jun 2017 08:37:48 GMT
Author: jsorel
Date: Fri Jun 16 08:37:48 2017
New Revision: 1798897

URL: http://svn.apache.org/viewvc?rev=1798897&view=rev
Log:
Fix TransformSeparator applied to PassThroughTransform

Modified:
    sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java?rev=1798897&r1=1798896&r2=1798897&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/TransformSeparator.java
[UTF-8] Fri Jun 16 08:37:48 2017
@@ -541,7 +541,7 @@ public class TransformSeparator {
              * not accept arbitrary index for modified ordinates.
              */
             if (containsAll(dimensions, lower, subLower) && containsAll(dimensions,
subUpper, upper)) {
-                return factory.createPassThroughTransform(subLower - lower, subTransform,
upper - subUpper);
+                return factory.createPassThroughTransform(subLower - lower, subTransform,
Math.max(0, upper - subUpper));
             }
         }
         /*
@@ -679,7 +679,7 @@ reduce:     for (int j=0; j <= numTgt; j
      * @return {@code true} if the full range was found in the sequence.
      */
     private static boolean containsAll(final int[] sequence, final int lower, int upper)
{
-        if (lower == upper) {
+        if (lower >= upper) {
             return true;
         }
         if (sequence != null) {



Mime
View raw message