summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5lImp.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/h5lImp.c
parent8f42566f7ac087504c115c7d98b79c56604c2ebe (diff)
downloadhdf5-3acd486b83f319579b1c6884c90289b0eb1d44a6.zip
hdf5-3acd486b83f319579b1c6884c90289b0eb1d44a6.tar.gz
hdf5-3acd486b83f319579b1c6884c90289b0eb1d44a6.tar.bz2
Fixes for JNI updates
Diffstat (limited to 'java/src/jni/h5lImp.c')
-rw-r--r--java/src/jni/h5lImp.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/java/src/jni/h5lImp.c b/java/src/jni/h5lImp.c
index 5999270..af6c8ba 100644
--- a/java/src/jni/h5lImp.c
+++ b/java/src/jni/h5lImp.c
@@ -59,6 +59,11 @@ Java_hdf_hdf5lib_H5_H5Lcopy
UNUSED(clss);
+ if (NULL == cur_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcopy: src name is NULL");
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcopy: dest name is NULL");
+
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lcopy: src name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lcopy: dest name not pinned");
@@ -89,6 +94,13 @@ Java_hdf_hdf5lib_H5_H5Lcreate_1external
UNUSED(clss);
+ if (NULL == file_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_external: file name is NULL");
+ if (NULL == cur_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_external: object name is NULL");
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_external: link name is NULL");
+
PIN_JAVA_STRING(ENVONLY, file_name, lFileName, NULL, "H5Lcreate_external: file name not pinned");
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lcreate_external: object name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lcreate_external: link name not pinned");
@@ -121,6 +133,11 @@ Java_hdf_hdf5lib_H5_H5Lcreate_1hard
UNUSED(clss);
+ if (NULL == cur_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_hard: object name is NULL");
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_hard: link name is NULL");
+
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lcreate_hard: object name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lcreate_hard: link name not pinned");
@@ -150,6 +167,11 @@ Java_hdf_hdf5lib_H5_H5Lcreate_1soft
UNUSED(clss);
+ if (NULL == cur_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_soft: link target is NULL");
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lcreate_soft: link name is NULL");
+
PIN_JAVA_STRING(ENVONLY, cur_name, linkTarget, NULL, "H5Lcreate_soft: link target not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, linkName, NULL, "H5Lcreate_soft: link name not pinned");
@@ -177,6 +199,9 @@ Java_hdf_hdf5lib_H5_H5Ldelete
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ldelete: link name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Ldelete: link name not pinned");
if ((status = H5Ldelete((hid_t)loc_id, linkName, (hid_t)access_id)) < 0)
@@ -203,6 +228,9 @@ Java_hdf_hdf5lib_H5_H5Ldelete_1by_1idx
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Ldelete_by_idx: group name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Ldelete_by_idx: group name not pinned");
if ((status = H5Ldelete_by_idx((hid_t)loc_id, groupName, (H5_index_t)index_field, (H5_iter_order_t)order, n, (hid_t)access_id)) < 0)
@@ -227,6 +255,9 @@ Java_hdf_hdf5lib_H5_H5Lexists
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lexists: link name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Lexists: link name not pinned");
if ((bval = H5Lexists((hid_t)loc_id, linkName, (hid_t)access_id)) < 0)
@@ -258,6 +289,9 @@ Java_hdf_hdf5lib_H5_H5Lget_1info
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_info: link name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Lget_info: link name not pinned");
if ((status = H5Lget_info((hid_t)loc_id, linkName, &infobuf, (hid_t)access_id)) < 0)
@@ -296,6 +330,9 @@ Java_hdf_hdf5lib_H5_H5Lget_1info_1by_1idx
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_info_by_idx: group name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Lget_info_by_idx: group name not pinned");
if ((status = H5Lget_info_by_idx((hid_t)loc_id, groupName, (H5_index_t)index_field, (H5_iter_order_t)order, (hsize_t)link_n, &infobuf, (hid_t)access_id)) < 0)
@@ -333,6 +370,9 @@ Java_hdf_hdf5lib_H5_H5Lget_1name_1by_1idx
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_name_by_idx: group name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Lget_name_by_idx: group name not pinned");
/* Get the length of the link name */
@@ -378,6 +418,9 @@ Java_hdf_hdf5lib_H5_H5Lget_1value
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_value: link name is NULL");
+
infobuf.type = H5L_TYPE_ERROR;
PIN_JAVA_STRING(ENVONLY, name, linkName, NULL, "H5Lget_value: link name not pinned");
@@ -465,6 +508,9 @@ Java_hdf_hdf5lib_H5_H5Lget_1value_1by_1idx
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lget_val_by_idx: group name is NULL");
+
infobuf.type = H5L_TYPE_ERROR;
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Lget_val_by_idx: group name not pinned");
@@ -551,6 +597,11 @@ Java_hdf_hdf5lib_H5_H5Lmove
UNUSED(clss);
+ if (NULL == cur_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lmove: src name is NULL");
+ if (NULL == dst_name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lmove: dest name is NULL");
+
PIN_JAVA_STRING(ENVONLY, cur_name, lCurName, NULL, "H5Lmove: src name not pinned");
PIN_JAVA_STRING(ENVONLY, dst_name, lDstName, NULL, "H5Lmove: dest name not pinned");
@@ -675,6 +726,8 @@ Java_hdf_hdf5lib_H5_H5Lvisit_1by_1name
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit_by_name: callback_op is NULL");
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Lvisit_by_name: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, grpName, NULL, "H5Lvisit_by_name: group name not pinned");
@@ -743,6 +796,8 @@ Java_hdf_hdf5lib_H5_H5Literate_1by_1name
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate_by_name: op_data is NULL");
if (NULL == callback_op)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate_by_name: callback_op is NULL");
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Literate_by_name: group name is NULL");
PIN_JAVA_STRING(ENVONLY, name, groupName, NULL, "H5Literate_by_name: group name not pinned");