summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-02-26 19:54:34 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-02-26 19:54:34 (GMT)
commit13f5b3aee20d1d65f56dc08f088e0f218da5cf37 (patch)
tree640a17d88714ec872636592e31010c6d4ec49010 /java
parentf53220dc201ba9ace215d517d857998e1e205fc7 (diff)
downloadhdf5-13f5b3aee20d1d65f56dc08f088e0f218da5cf37.zip
hdf5-13f5b3aee20d1d65f56dc08f088e0f218da5cf37.tar.gz
hdf5-13f5b3aee20d1d65f56dc08f088e0f218da5cf37.tar.bz2
Update examples and fix old version references.
Diffstat (limited to 'java')
-rw-r--r--java/src/hdf/overview.html2
-rw-r--r--java/src/jni/h5pFAPLImp.c56
2 files changed, 22 insertions, 36 deletions
diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html
index e3a032b..f6a34fc 100644
--- a/java/src/hdf/overview.html
+++ b/java/src/hdf/overview.html
@@ -7,7 +7,7 @@ The <b>Java HD5 Interface (JHI5)</b> is a Java package
(<a href="../../hdf-java-html/javadocs/hdf/hdf5lib/package-summary.html">hdf.hdf5lib</a>)
that ``wraps around'' the HDF5 library.
<p>There are a large number of functions in the HDF5
-library (version 1.10). Some of the functions are not supported in JHI5. Most
+library (version 1.13). Some of the functions are not supported in JHI5. Most
of the unsupported functions have C function pointers, which is not currently
implemented in JHI5.</p>
diff --git a/java/src/jni/h5pFAPLImp.c b/java/src/jni/h5pFAPLImp.c
index 178b1af..9ae8775 100644
--- a/java/src/jni/h5pFAPLImp.c
+++ b/java/src/jni/h5pFAPLImp.c
@@ -395,29 +395,23 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1hdfs
if (H5Pget_fapl_hdfs((hid_t)fapl_id, &fa) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (HDstrlen(fa.namenode_name) > 0) {
- if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string");
- }
+ if (NULL == (j_namenode_name = ENVPTR->NewStringUTF(ENVONLY, fa.namenode_name))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create namenode_name string");
}
args[0].l = j_namenode_name;
args[1].i = (jint)fa.namenode_port;
- if (HDstrlen(fa.user_name) > 0) {
- if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string");
- }
+ if (NULL == (j_user_name = ENVPTR->NewStringUTF(ENVONLY, fa.user_name))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create user_name string");
}
args[2].l = j_user_name;
- if (HDstrlen(fa.kerberos_ticket_cache) > 0) {
- if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string");
- }
+ if (NULL == (j_kerb_cache_path = ENVPTR->NewStringUTF(ENVONLY, fa.kerberos_ticket_cache))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_hdfs: out of memory - can't create kerberos_ticket_cache string");
}
args[3].l = j_kerb_cache_path;
@@ -820,27 +814,21 @@ Java_hdf_hdf5lib_H5_H5Pget_1fapl_1ros3
if (H5Pget_fapl_ros3((hid_t)fapl_id, &fa) < 0)
H5_LIBRARY_ERROR(ENVONLY);
- if (HDstrlen(fa.aws_region) > 0) {
- if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string");
- }
+ if (NULL == (j_aws = ENVPTR->NewStringUTF(ENVONLY, fa.aws_region))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create aws_region string");
}
args[0].l = j_aws;
- if (HDstrlen(fa.secret_id) > 0) {
- if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string");
- }
+ if (NULL == (j_id = ENVPTR->NewStringUTF(ENVONLY, fa.secret_id))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_id string");
}
args[1].l = j_id;
- if (HDstrlen(fa.secret_key) > 0) {
- if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string");
- }
+ if (NULL == (j_key = ENVPTR->NewStringUTF(ENVONLY, fa.secret_key))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_fapl_ros3: out of memory - can't create secret_key string");
}
args[2].l = j_key;
@@ -1685,11 +1673,9 @@ Java_hdf_hdf5lib_H5_H5Pget_1mdc_1config
args[2].z = cacheinfo.open_trace_file;
args[3].z = cacheinfo.close_trace_file;
- if (HDstrlen(cacheinfo.trace_file_name) > 0) {
- if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) {
- CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters");
- }
+ if (NULL == (j_str = ENVPTR->NewStringUTF(ENVONLY, cacheinfo.trace_file_name))) {
+ CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Pget_mdc_config: out of memory - unable to construct string from UTF characters");
}
args[4].l = j_str;