sis-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From desruisse...@apache.org
Subject svn commit: r1678711 - /sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
Date Mon, 11 May 2015 09:57:33 GMT
Author: desruisseaux
Date: Mon May 11 09:57:33 2015
New Revision: 1678711

URL: http://svn.apache.org/r1678711
Log:
Referencing: removed an assertion which was too strict.

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

Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java?rev=1678711&r1=1678710&r2=1678711&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/transform/ConcatenatedTransform.java
[UTF-8] Mon May 11 09:57:33 2015
@@ -218,8 +218,6 @@ class ConcatenatedTransform extends Abst
          * Can not avoid the creation of a ConcatenatedTransform object.
          * Check for the type to create (1D, 2D, general case...)
          */
-        assert tr1.getTargetDimensions() == dim1;
-        assert tr2.getSourceDimensions() == dim2;
         final int dimSource = tr1.getSourceDimensions();
         final int dimTarget = tr2.getTargetDimensions();
         if (dimSource == 1 && dimTarget == 1) {
@@ -242,7 +240,9 @@ class ConcatenatedTransform extends Abst
             } else {
                 return new ConcatenatedTransform2D(tr1, tr2);
             }
-        } else if (dimSource == dim1 && dim2 == dimTarget) {
+        } else if (dimSource == tr1.getTargetDimensions()   // dim1 = tr1.getTargetDimensions()
and
+                && dimTarget == tr2.getSourceDimensions())  // dim2 = tr2.getSourceDimensions()
may not be true anymore.
+        {
             return new ConcatenatedTransformDirect(tr1, tr2);
         } else {
             return new ConcatenatedTransform(tr1, tr2);



Mime
View raw message