summaryrefslogtreecommitdiffstats
path: root/java/src/jni/h5fImp.c
diff options
context:
space:
mode:
Diffstat (limited to 'java/src/jni/h5fImp.c')
-rw-r--r--java/src/jni/h5fImp.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/java/src/jni/h5fImp.c b/java/src/jni/h5fImp.c
index 624c788..d145c6a 100644
--- a/java/src/jni/h5fImp.c
+++ b/java/src/jni/h5fImp.c
@@ -47,6 +47,9 @@ Java_hdf_hdf5lib_H5__1H5Fopen
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fopen: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fopen: file name not pinned");
if ((status = H5Fopen(fileName, (unsigned)flags, (hid_t)access_id)) < 0)
@@ -73,6 +76,9 @@ Java_hdf_hdf5lib_H5__1H5Fcreate
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fcreate: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fcreate: file name not pinned");
if ((status = H5Fcreate(fileName, (unsigned)flags, create_id, access_id)) < 0)
@@ -159,6 +165,9 @@ Java_hdf_hdf5lib_H5_H5Fis_1hdf5
H5_UNIMPLEMENTED(ENVONLY, "H5Fis_hdf5: not implemented");
#endif
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fis_hdf5: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fis_hdf5: file name not pinned");
if ((bval = H5Fis_hdf5(fileName)) < 0)
@@ -187,6 +196,9 @@ Java_hdf_hdf5lib_H5_H5Fis_1accessible
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fis_accessible: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fis_accessible: file name not pinned");
if ((bval = H5Fis_accessible(fileName, (hid_t)file_id)) < 0)
@@ -295,6 +307,9 @@ Java_hdf_hdf5lib_H5_H5Fmount
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Fmount: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Fmount: file name not pinned");
if ((status = H5Fmount((hid_t)loc_id, fileName, (hid_t)child_id, (hid_t)plist_id)) < 0)
@@ -321,6 +336,9 @@ Java_hdf_hdf5lib_H5_H5Funmount
UNUSED(clss);
+ if (NULL == name)
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Funmount: file name is NULL");
+
PIN_JAVA_STRING(ENVONLY, name, fileName, NULL, "H5Funmount: file name not pinned");
if ((status = H5Funmount((hid_t)loc_id, fileName)) < 0)