summaryrefslogtreecommitdiffstats
path: root/java
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-10-29 18:14:51 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-10-29 18:14:51 (GMT)
commita4cbd51db61868d6190d7c10764b0c9e9666b6ee (patch)
tree0711306f9b17663b906593528c00d964df955d05 /java
parentba00760d7a078c25bfc2108060320e7d96ffdd4e (diff)
downloadhdf5-a4cbd51db61868d6190d7c10764b0c9e9666b6ee.zip
hdf5-a4cbd51db61868d6190d7c10764b0c9e9666b6ee.tar.gz
hdf5-a4cbd51db61868d6190d7c10764b0c9e9666b6ee.tar.bz2
HDFFV-10868 Corrections from review
Diffstat (limited to 'java')
-rw-r--r--java/src/hdf/hdf5lib/H5.java2
-rw-r--r--java/src/jni/h5sImp.c42
2 files changed, 22 insertions, 22 deletions
diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java
index 6ad7cf2..1f6d0dc 100644
--- a/java/src/hdf/hdf5lib/H5.java
+++ b/java/src/hdf/hdf5lib/H5.java
@@ -5370,7 +5370,6 @@ public class H5 implements java.io.Serializable {
**/
public synchronized static native long H5Iget_file_id(long obj_id) throws HDF5LibraryException;
-
/**
* H5Iget_name_long retrieves the name of an object specified by the identifier, obj_id.
* @deprecated
@@ -5387,6 +5386,7 @@ public class H5 implements java.io.Serializable {
* @exception HDF5LibraryException
* - Error from the HDF-5 Library.
**/
+ @Deprecated
public synchronized static native long H5Iget_name_long(long obj_id, String[] name, long size)
throws HDF5LibraryException, NullPointerException;
/**
diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c
index e29c2ec..f7b65d9 100644
--- a/java/src/jni/h5sImp.c
+++ b/java/src/jni/h5sImp.c
@@ -1348,11 +1348,11 @@ done:
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Sselect_1copy(JNIEnv *env, jclass clss, jlong dst_id, jlong src_id)
{
- hssize_t retVal = -1;
+ herr_t status = FAIL;
UNUSED(clss);
- if ((retVal = H5Sselect_copy((hid_t)dst_id, (hid_t)src_id)) < 0)
+ if ((status = H5Sselect_copy((hid_t)dst_id, (hid_t)src_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done:
@@ -1567,26 +1567,26 @@ Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *env, jclass clss, jlong space_
UNUSED(clss);
if (NULL == start)
- H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: start is NULL");
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: start is NULL");
if (NULL == count)
- H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: count is NULL");
+ H5_NULL_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: count is NULL");
if ((start_rank = ENVPTR->GetArrayLength(ENVONLY, start)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: start array length < 0");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: start array length < 0");
}
if ((count_rank = ENVPTR->GetArrayLength(ENVONLY, count)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: count array length < 0");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: count array length < 0");
}
if (start_rank != count_rank)
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: count and start have different rank!");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: count and start have different rank!");
- PIN_LONG_ARRAY(ENVONLY, start, startP, &isCopy, "H5Sselect_hyperslab: start not pinned");
+ PIN_LONG_ARRAY(ENVONLY, start, startP, &isCopy, "H5Scombine_hyperslab: start not pinned");
if (NULL == (strt = lp = (hsize_t *)HDmalloc((size_t)start_rank * sizeof(hsize_t))))
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate start buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Scombine_hyperslab: failed to allocate start buffer");
jlp = (jlong *)startP;
for (i = 0; i < start_rank; i++) {
@@ -1595,10 +1595,10 @@ Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *env, jclass clss, jlong space_
jlp++;
} /* end if */
- PIN_LONG_ARRAY(ENVONLY, count, countP, &isCopy, "H5Sselect_hyperslab: count not pinned");
+ PIN_LONG_ARRAY(ENVONLY, count, countP, &isCopy, "H5Scombine_hyperslab: count not pinned");
if (NULL == (cnt = lp = (hsize_t *)HDmalloc((size_t)count_rank * sizeof(hsize_t))))
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate count buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Scombine_hyperslab: failed to allocate count buffer");
jlp = (jlong *)countP;
for (i = 0; i < count_rank; i++) {
@@ -1614,16 +1614,16 @@ Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *env, jclass clss, jlong space_
else {
if ((stride_rank = ENVPTR->GetArrayLength(ENVONLY, stride)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: stride array length < 0");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: stride array length < 0");
}
if (stride_rank != start_rank)
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: stride and start have different rank!");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: stride and start have different rank!");
- PIN_LONG_ARRAY(ENVONLY, stride, strideP, &isCopy, "H5Sselect_hyperslab: stride not pinned");
+ PIN_LONG_ARRAY(ENVONLY, stride, strideP, &isCopy, "H5Scombine_hyperslab: stride not pinned");
if (NULL == (strd = lp = (hsize_t *)HDmalloc((size_t)stride_rank * sizeof(hsize_t))))
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate stride buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Scombine_hyperslab: failed to allocate stride buffer");
jlp = (jlong *)strideP;
for (i = 0; i < stride_rank; i++) {
@@ -1640,16 +1640,16 @@ Java_hdf_hdf5lib_H5_H5Scombine_1hyperslab(JNIEnv *env, jclass clss, jlong space_
else {
if ((block_rank = ENVPTR->GetArrayLength(ENVONLY, block)) < 0) {
CHECK_JNI_EXCEPTION(ENVONLY, JNI_TRUE);
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: block array length < 0");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: block array length < 0");
}
if (block_rank != start_rank)
- H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Sselect_hyperslab: block and start have different rank!");
+ H5_BAD_ARGUMENT_ERROR(ENVONLY, "H5Scombine_hyperslab: block and start have different rank!");
- PIN_LONG_ARRAY(ENVONLY, block, blockP, &isCopy, "H5Sselect_hyperslab: block not pinned");
+ PIN_LONG_ARRAY(ENVONLY, block, blockP, &isCopy, "H5Scombine_hyperslab: block not pinned");
if (NULL == (blk = lp = (hsize_t *)HDmalloc((size_t)block_rank * sizeof(hsize_t))))
- H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Sselect_hyperslab: failed to allocate block buffer");
+ H5_OUT_OF_MEMORY_ERROR(ENVONLY, "H5Scombine_hyperslab: failed to allocate block buffer");
jlp = (jlong *)blockP;
for (i = 0; i < block_rank; i++) {
@@ -1692,11 +1692,11 @@ done:
JNIEXPORT void JNICALL
Java_hdf_hdf5lib_H5_H5Smodify_1select(JNIEnv *env, jclass clss, jlong space1_id, jint op, jlong space2_id)
{
- hssize_t retVal = -1;
+ herr_t status = FAIL;
UNUSED(clss);
- if ((retVal = H5Smodify_select((hid_t)space1_id, (H5S_seloper_t)op, (hid_t)space2_id)) < 0)
+ if ((status = H5Smodify_select((hid_t)space1_id, (H5S_seloper_t)op, (hid_t)space2_id)) < 0)
H5_LIBRARY_ERROR(ENVONLY);
done: