This is an automated email from the ASF dual-hosted git repository.
amanin 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 540ea55fa4 fix(Referencing): prevent NPE on complex crs conversion
analysis
540ea55fa4 is described below
commit 540ea55fa461332d04ba8c35d4e7ee9c6d0ae3f2
Author: Alexis Manin <[email protected]>
AuthorDate: Tue Jul 1 15:55:18 2025 +0200
fix(Referencing): prevent NPE on complex crs conversion analysis
An internal method is shifting array elements to the left on some
condition, but was missing an index update to check again the position where
the shift begin (whose element has been replaced by the move).
---
.../main/org/apache/sis/referencing/operation/SubOperationInfo.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/SubOperationInfo.java
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/SubOperationInfo.java
index 75f660aebb..6b63c2b0d1 100644
---
a/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/SubOperationInfo.java
+++
b/endorsed/src/org.apache.sis.referencing/main/org/apache/sis/referencing/operation/SubOperationInfo.java
@@ -277,6 +277,7 @@ next: for (int targetComponentIndex = 0;
targetComponentIndex < infos.length;
System.arraycopy(selected, i+1, selected, i, last - i);
selected[last] = component;
n--;
+ i--;
}
}
final var stepComponents = new CoordinateReferenceSystem[n];