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


The following commit(s) were added to refs/heads/geoapi-4.0 by this push:
     new a16d4da  Fix a `NullPointerException`.
a16d4da is described below

commit a16d4da0badc7604608ff4f2b33671050bdb8365
Author: Martin Desruisseaux <[email protected]>
AuthorDate: Wed Mar 10 11:43:56 2021 +0100

    Fix a `NullPointerException`.
---
 .../src/main/java/org/apache/sis/coverage/grid/GridGeometry.java       | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
index bea2355..31d2195 100644
--- 
a/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
+++ 
b/core/sis-feature/src/main/java/org/apache/sis/coverage/grid/GridGeometry.java
@@ -659,7 +659,8 @@ public class GridGeometry implements LenientComparable, 
Serializable {
         } else {
             this.envelope = target;
             if (extent != null) {
-                if (orientation != null && orientation.canReorderGridAxis) {
+                // A non-null `sourceDimensions` implies non-null 
`orientation`.
+                if (sourceDimensions != null && 
orientation.canReorderGridAxis) {
                     if (!ArraysExt.isRange(0, sourceDimensions)) {
                         extent = extent.reorder(sourceDimensions);
                     }

Reply via email to