summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2018-06-28 19:22:50 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2018-06-28 19:22:50 (GMT)
commit5a1d2986699d4c8dbad7feec464d9e628973adaf (patch)
treef35bb52b7e61f263fe9c8ca827e8b989553c7e2d /java
parentc3e666e4b298a6a774a1d712524609f7aecc34c0 (diff)
downloadhdf5-5a1d2986699d4c8dbad7feec464d9e628973adaf.zip
hdf5-5a1d2986699d4c8dbad7feec464d9e628973adaf.tar.gz
hdf5-5a1d2986699d4c8dbad7feec464d9e628973adaf.tar.bz2
Region reference in compounds need class check
Diffstat (limited to 'java')
-rw-r--r--java/src/hdf/hdf5lib/H5.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 4060ca9..987cc1d 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -1746,14 +1746,15 @@ public class H5 implements java.io.Serializable {
status = H5Dread_double(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(double[]) obj, isCriticalPinning);
}
- else if (H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
+ else if ((H5.H5Tdetect_class(mem_type_id, HDF5Constants.H5T_REFERENCE) && (is1D && (dataClass.getComponentType() == String.class))) || H5.H5Tequal(mem_type_id, HDF5Constants.H5T_STD_REF_DSETREG)) {
log.trace("H5Dread_reg_ref");
status = H5Dread_reg_ref(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
(String[]) obj);
}
else if (is1D && (dataClass.getComponentType() == String.class)) {
- log.trace("H5DreadVL type");
- status = H5DreadVL(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id, (Object[]) obj);
+ log.trace("H5Dread_string type");
+ status = H5Dread_string(dataset_id, mem_type_id, mem_space_id, file_space_id, xfer_plist_id,
+ (String[]) obj);
}
else {
// Create a data buffer to hold the data into a Java Array