summaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-06-18 18:20:47 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-06-18 18:20:47 (GMT)
commit00f39b23c11ce989351125496381cdcc4c54b16f (patch)
tree216384cbec985dc5ab05be367ae505dc185076fc /java/src
parent8e62f1fe7b38b630f1a41007a03341cb66dec4b3 (diff)
downloadhdf5-00f39b23c11ce989351125496381cdcc4c54b16f.zip
hdf5-00f39b23c11ce989351125496381cdcc4c54b16f.tar.gz
hdf5-00f39b23c11ce989351125496381cdcc4c54b16f.tar.bz2
HDFFV-11111 add unimplemented errors in JNI
Diffstat (limited to 'java/src')
-rw-r--r--java/src/jni/h5aImp.c21
-rw-r--r--java/src/jni/h5pFCPLImp.c10
2 files changed, 31 insertions, 0 deletions
diff --git a/java/src/jni/h5aImp.c b/java/src/jni/h5aImp.c
index b59aeb6..c1a2631 100644
--- a/java/src/jni/h5aImp.c
+++ b/java/src/jni/h5aImp.c
@@ -94,11 +94,18 @@ JNIEXPORT jlong JNICALL
Java_hdf_hdf5lib_H5__1H5Aopen_1name
(JNIEnv *env, jclass clss, jlong loc_id, jstring name)
{
+#ifndef H5_NO_DEPRECATED_SYMBOLS
const char *attrName = NULL;
+#endif
hid_t attr_id = H5I_INVALID_HID;
UNUSED(clss);
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+ UNUSED(loc_id);
+ UNUSED(name);
+ H5_UNIMPLEMENTED(ENVONLY, "H5Aopen_name: not implemented");
+#else
if (NULL == name)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Aopen_name: attribute name is null");
@@ -106,10 +113,13 @@ Java_hdf_hdf5lib_H5__1H5Aopen_1name
if((attr_id = H5Aopen_name((hid_t)loc_id, attrName)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
+#endif
done:
+#ifndef H5_NO_DEPRECATED_SYMBOLS
if (attrName)
UNPIN_JAVA_STRING(ENVONLY, name, attrName);
+#endif
return (jlong)attr_id;
} /* end Java_hdf_hdf5lib_H5__1H5Aopen_1name */
@@ -127,8 +137,14 @@ Java_hdf_hdf5lib_H5__1H5Aopen_1idx
UNUSED(clss);
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+ UNUSED(loc_id);
+ UNUSED(idx);
+ H5_UNIMPLEMENTED(ENVONLY, "H5Aopen_idx: not implemented");
+#else
if ((attr_id = H5Aopen_idx((hid_t) loc_id, (unsigned int) idx)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
+#endif
done:
return (jlong)attr_id;
@@ -1512,8 +1528,13 @@ Java_hdf_hdf5lib_H5_H5Aget_1num_1attrs
UNUSED(clss);
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+ UNUSED(loc_id);
+ H5_UNIMPLEMENTED(ENVONLY, "H5Aget_num_attrs: not implemented");
+#else
if ((retVal = H5Aget_num_attrs((hid_t)loc_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
+#endif
done:
return (jint)retVal;
diff --git a/java/src/jni/h5pFCPLImp.c b/java/src/jni/h5pFCPLImp.c
index cc7c264..e056fa8 100644
--- a/java/src/jni/h5pFCPLImp.c
+++ b/java/src/jni/h5pFCPLImp.c
@@ -40,13 +40,20 @@ JNIEXPORT jint JNICALL
Java_hdf_hdf5lib_H5_H5Pget_1version
(JNIEnv *env, jclass clss, jlong plist, jintArray version_info)
{
+#ifdef H5_NO_DEPRECATED_SYMBOLS
jboolean isCopy;
jsize arrLen;
jint *theArray = NULL;
+#endif
herr_t status = FAIL;
UNUSED(clss);
+#ifdef H5_NO_DEPRECATED_SYMBOLS
+ UNUSED(loc_id);
+ UNUSED(name);
+ H5_UNIMPLEMENTED(ENVONLY, "H5Aopen_name: not implemented");
+#else
if (NULL == version_info)
H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Pget_version: version_info input array is NULL");
@@ -62,10 +69,13 @@ Java_hdf_hdf5lib_H5_H5Pget_1version
if ((status = H5Pget_version((hid_t)plist, (unsigned *)&(theArray[0]),
(unsigned *)&(theArray[1]), (unsigned *)&(theArray[2]), (unsigned *)&(theArray[3]))) < 0)
H5_LIBRARY_ERROR(ENVONLY);
+#endif
done:
+#ifdef H5_NO_DEPRECATED_SYMBOLS
if (theArray)
UNPIN_INT_ARRAY(ENVONLY, version_info, theArray, (status < 0) ? JNI_ABORT : 0);
+#endif
return (jint)status;
} /* end Java_hdf_hdf5lib_H5_H5Pget_1version */