summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5rImp.c
diff options
context:
space:
mode:
authorAllen Byrne <50328838+byrnHDF@users.noreply.github.com>2022-07-18 17:23:37 (GMT)
committerGitHub <noreply@github.com>2022-07-18 17:23:37 (GMT)
commitf6997681335f0b5fe2e8904f9108a71c5200fb2d (patch)
treeedc5aabdcae1035ce6e888bde550e15b1ad2e878 /java/src/jni/h5rImp.c
parent7f9a5f0b6e58e9c04a18ea83ff0400f95294c6ac (diff)
downloadhdf5-f6997681335f0b5fe2e8904f9108a71c5200fb2d.zip
hdf5-f6997681335f0b5fe2e8904f9108a71c5200fb2d.tar.gz
hdf5-f6997681335f0b5fe2e8904f9108a71c5200fb2d.tar.bz2
1.12 eliminate unnecessary errors in the error stack (#1880)
* Eliminate unnecessary error output * Fix merge typo * fix format * Fix object address to tokens * Fix conflict
Diffstat (limited to 'java/src/jni/h5rImp.c')
-rw-r--r--java/src/jni/h5rImp.c61
1 files changed, 0 insertions, 61 deletions
diff --git a/java/src/jni/h5rImp.c b/java/src/jni/h5rImp.c
index 58b5522..9fe0701 100644
--- a/java/src/jni/h5rImp.c
+++ b/java/src/jni/h5rImp.c
@@ -877,67 +877,6 @@ done:
return ret_val;
} /* end Java_hdf_hdf5lib_H5_H5Rget_1name */
-/*
- * Class: hdf_hdf5lib_H5
- * Method: H5Rget_name_string
- * Signature: (JI[B)Ljava/lang/String;
- */
-JNIEXPORT jstring JNICALL
-Java_hdf_hdf5lib_H5_H5Rget_1name_1string(JNIEnv *env, jclass clss, jlong loc_id, jint ref_type,
- jbyteArray ref)
-{
- jboolean isCopy;
- jstring str;
- jsize refBufLen;
- jbyte * refBuf = NULL;
- char * aName = NULL;
- ssize_t buf_size = -1;
- jlong ret_val = -1;
-
- UNUSED(clss);
-
- if (NULL == ref)
- H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: reference buffer is NULL");
-
- if ((refBufLen = ENVPTR->GetArrayLength(ENVONLY, ref)) < 0) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: ref array length < 0");
- }
-
- if ((H5R_OBJECT == ref_type) && (refBufLen != H5R_OBJ_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: reference input array length != H5R_OBJ_REF_BUF_SIZE");
- else if ((H5R_DATASET_REGION == ref_type) && (refBufLen != H5R_DSET_REG_REF_BUF_SIZE))
- H5_BAD_ARGUMENT_ERROR(
- ENVONLY, "H5Rget_name: region reference input array length != H5R_DSET_REG_REF_BUF_SIZE");
- else if ((H5R_OBJECT != ref_type) && (H5R_DATASET_REGION != ref_type))
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Rget_name: unknown reference type");
-
- PIN_BYTE_ARRAY(ENVONLY, ref, refBuf, &isCopy, "H5Rget_name: reference buffer not pinned");
-
- /* Get the length of the name */
- if ((buf_size = H5Rget_name((hid_t)loc_id, (H5R_type_t)ref_type, refBuf, NULL, 0)) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
-
- if (NULL == (aName = HDmalloc(sizeof(char) * (size_t)buf_size + 1)))
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Rget_name: failed to allocate referenced object name buffer");
-
- if ((ret_val = (jlong)H5Rget_name((hid_t)loc_id, (H5R_type_t)ref_type, refBuf, aName,
- (size_t)buf_size + 1)) < 0)
- H5_LIBRARY_ERROR(ENVONLY);
- aName[(size_t)buf_size] = '\0';
-
- if (NULL == (str = ENVPTR->NewStringUTF(ENVONLY, aName)))
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_FALSE);
-
-done:
- if (aName)
- HDfree(aName);
- if (refBuf)
- UNPIN_BYTE_ARRAY(ENVONLY, ref, refBuf, JNI_ABORT);
-
- return str;
-} /* end Java_hdf_hdf5lib_H5_H5Rget_1name_1string */
-
#ifdef __cplusplus
} /* end extern "C" */
#endif /* __cplusplus */