Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing dataset reference text #1081

Merged
merged 2 commits into from
Oct 7, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions java/src/jni/h5util.c
Original file line number Diff line number Diff line change
Expand Up @@ -658,8 +658,6 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p)

int ret_value = FAIL;

if (!h5str_append(out_str, " \""))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quotes are not needed.

H5_ASSERTION_ERROR(ENVONLY, "Unable to append string.");
buf_size = H5Rget_file_name(ref_vp, NULL, 0);
if (buf_size) {
ref_name = (char *)HDmalloc(sizeof(char) * (size_t)buf_size + 1);
Expand Down Expand Up @@ -697,8 +695,6 @@ h5str_sprint_reference(JNIEnv *env, h5str_t *out_str, void *ref_p)
ref_name = NULL;
}
}
if (!h5str_append(out_str, "\""))
H5_ASSERTION_ERROR(ENVONLY, "Unable to append string.");

ret_value = SUCCEED;
done:
Expand All @@ -725,6 +721,10 @@ h5str_region_dataset(JNIEnv *env, h5str_t *out_str, H5R_ref_t *ref_vp, int expan
if ((new_obj_sid = H5Ropen_region(ref_vp, H5P_DEFAULT, H5P_DEFAULT)) < 0)
H5_LIBRARY_ERROR(ENVONLY);

if (expand_data == 0)
if (h5str_sprint_reference(ENVONLY, out_str, ref_vp) < 0)
CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);

if ((region_type = H5Sget_select_type(new_obj_sid)) > H5S_SEL_ERROR) {
if (H5S_SEL_POINTS == region_type) {
if (h5str_dump_region_points(ENVONLY, out_str, new_obj_sid, new_obj_id, expand_data) < 0)
Expand Down