Skip to content

Commit bab7aaa

Browse files
Simplify duplicated group existence check
1 parent 93f4157 commit bab7aaa

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/main/java/com/glencoesoftware/pyramid/PyramidFromDirectoryWriter.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,18 +1016,15 @@ private void findNumberOfResolutions(PyramidSeries s)
10161016
List<Map<String, Object>> multiscales = null;
10171017

10181018
Group seriesGroup = getZarrGroup(s.path);
1019-
if (isV3()) {
1020-
if (seriesGroup == null) {
1021-
throw new IOException("Expected series " + s.index + " not found");
1022-
}
1019+
if (seriesGroup == null) {
1020+
throw new IOException("Expected series " + s.index + " not found");
1021+
}
10231022

1023+
if (isV3()) {
10241024
Attributes ome = getGroupAttributes(seriesGroup).getAttributes("ome");
10251025
multiscales = (List<Map<String, Object>>) ome.get("multiscales");
10261026
}
10271027
else {
1028-
if (seriesGroup == null) {
1029-
throw new IOException("Expected series " + s.index + " not found");
1030-
}
10311028
arrayKeys = getSubgroupCount(s.path);
10321029

10331030
multiscales = (List<Map<String, Object>>)

0 commit comments

Comments
 (0)