Skip to content

Commit 8941acc

Browse files
Update NetCDFServiceImpl.java to use the new version of NetCDF-Java
1 parent 37cba60 commit 8941acc

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

components/formats-gpl/src/loci/formats/services/NetCDFServiceImpl.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,16 @@
4545
import ucar.nc2.Attribute;
4646
import ucar.nc2.Group;
4747
import ucar.nc2.NetcdfFile;
48+
import ucar.nc2.NetcdfFiles;
4849
import ucar.nc2.Variable;
4950

5051
import com.esotericsoftware.kryo.Kryo;
5152
import com.esotericsoftware.kryo.KryoSerializable;
5253
import com.esotericsoftware.kryo.io.Input;
5354
import com.esotericsoftware.kryo.io.Output;
5455

56+
import com.google.common.collect.ImmutableList;
57+
5558
/**
5659
* Utility class for working with NetCDF/HDF files. Uses reflection to
5760
* call the NetCDF Java library.
@@ -247,7 +250,7 @@ private void parseAttributesAndVariables(List<Group> groups) {
247250
if (!groupName.endsWith("/")) variableName = "/" + variableName;
248251
variableList.add(variableName);
249252
}
250-
groups = group.getGroups();
253+
groups = (List<Group>) group.getGroups();
251254
parseAttributesAndVariables(groups);
252255
}
253256
}
@@ -307,7 +310,7 @@ public void print(String s) { }
307310
};
308311
System.setOut(throwaway);
309312
throwaway.close();
310-
netCDFFile = NetcdfFile.open(currentId);
313+
netCDFFile = NetcdfFiles.open(currentId);
311314
System.setOut(outStream);
312315
root = netCDFFile.getRootGroup();
313316
}

0 commit comments

Comments
 (0)