Skip to content

Commit

Permalink
Fix i substring index
Browse files Browse the repository at this point in the history
  • Loading branch information
tferr committed Jan 4, 2023
1 parent 75b1953 commit 7e21b9f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/sc/fiji/snt/annotation/AllenCompartment.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ private boolean isChildOfWithoutChecks(final AllenCompartment parent) {
final int parentIdxInPath = childStructureIdPath.lastIndexOf("/" + parentIdString + "/");
if (parentIdxInPath == -1)
return false;
return Arrays.stream(childStructureIdPath.substring(parentIdxInPath + parentIdString.length()).split("/"))
return Arrays.stream(childStructureIdPath.substring(parentIdxInPath + parentIdString.length() + 1).split("/"))
.filter(s -> !s.isEmpty())
.map(Integer::parseInt)
.anyMatch(id -> id == id());
Expand Down

0 comments on commit 7e21b9f

Please sign in to comment.