summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5oImp.c
diff options
context:
space:
mode:
authorJordan Henderson <jhenderson@hdfgroup.org>2019-02-12 17:41:55 (GMT)
committerJordan Henderson <jhenderson@hdfgroup.org>2019-02-12 17:56:42 (GMT)
commit3acd486b83f319579b1c6884c90289b0eb1d44a6 (patch)
treef4b0093c1915d2fbd704ea1948b80ba089ab82f5 /java/src/jni/h5oImp.c
parent8f42566f7ac087504c115c7d98b79c56604c2ebe (diff)
downloadhdf5-3acd486b83f319579b1c6884c90289b0eb1d44a6.zip
hdf5-3acd486b83f319579b1c6884c90289b0eb1d44a6.tar.gz
hdf5-3acd486b83f319579b1c6884c90289b0eb1d44a6.tar.bz2
Fixes for JNI updates
Diffstat (limited to 'java/src/jni/h5oImp.c')
-rw-r--r--java/src/jni/h5oImp.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/java/src/jni/h5oImp.c b/java/src/jni/h5oImp.c
index 0b1a984..cc88b81 100644
--- a/java/src/jni/h5oImp.c
+++ b/java/src/jni/h5oImp.c
@@ -56,6 +56,9 @@ Java_hdf_hdf5lib_H5__1H5Oopen
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oopen: object name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oopen: object name not pinned");
if ((status = H5Oopen((hid_t)loc_id, objName, (hid_t)access_plist_id)) < 0)
@@ -104,6 +107,11 @@ Java_hdf_hdf5lib_H5_H5Ocopy
UNUSED(clss);
+ if (NULL == cur_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ocopy: src name is NULL");
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ocopy: dst name is NULL");
+
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Ocopy: src name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Ocopy: dest name not pinned");
@@ -204,6 +212,9 @@ Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1name
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_info_by_name: object name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oget_info_by_name: object name not pinned");
if ((status = H5Oget_info_by_name2((hid_t)loc_id, objName, &infobuf, (unsigned)fields, (hid_t)access_id)) < 0)
@@ -278,6 +289,9 @@ Java_hdf_hdf5lib_H5_H5Oget_1info_1by_1idx
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_info_by_idx: group name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Oget_info_by_idx: group name not pinned");
if ((status = H5Oget_info_by_idx2((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order, (hsize_t)link_n, &infobuf, (unsigned)fields, (hid_t)access_id)) < 0)
@@ -346,6 +360,9 @@ Java_hdf_hdf5lib_H5_H5Olink
UNUSED(clss);
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Olink: link destination name is NULL");
+
PIN_JAVA_STRING(ENVONLY, dst_name, linkDstName, NULL, "H5Olink: link destination name not pinned");
if ((status = H5Olink((hid_t)cur_loc_id, (hid_t)dst_loc_id, linkDstName, (hid_t)create_id, (hid_t)access_id)) < 0)
@@ -525,6 +542,8 @@ Java_hdf_hdf5lib_H5_H5Ovisit_1by_1name
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit_by_name: callback_op is NULL");
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ovisit_by_name: object name is NULL");
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Ovisit_by_name: object name not pinned");
@@ -580,6 +599,9 @@ Java_hdf_hdf5lib_H5_H5Oset_1comment_1by_1name
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oset_comment_by_name: object name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oset_comment_by_name: object name not pinned");
if (NULL != comment)
@@ -651,6 +673,9 @@ Java_hdf_hdf5lib_H5_H5Oget_1comment_1by_1name
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oget_comment_by_name: object name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oget_comment_by_name: object name not pinned");
/* Get the length of the comment */
@@ -692,6 +717,9 @@ Java_hdf_hdf5lib_H5_H5Oexists_1by_1name
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oexists_by_name: object name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, objName, NULL, "H5Oexists_by_name: object name not pinned");
if ((bval = H5Oexists_by_name((hid_t)loc_id, objName, (hid_t)access_id)) < 0)
@@ -777,6 +805,9 @@ Java_hdf_hdf5lib_H5__1H5Oopen_1by_1idx
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Oopen_by_idx: object name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Oopen_by_idx: object name not pinned");
if ((retVal = H5Oopen_by_idx((hid_t)loc_id, grpName, (H5_index_t)index_field, (H5_iter_order_t)order, (hsize_t)link_n, (hid_t)lapl_id)) < 0)