summaryrefslogtreecommitdiffstats
path: root/java/src/jni
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2016-03-24 17:21:04 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2016-03-24 17:21:04 (GMT)
commit261f8c83611db7b19f3a697720926d825b375a1d (patch)
tree890d34d919fd26265cbdb383a7e47744805940c0 /java/src/jni
parentd9ab44fe466197b8dd89aa4dcf4dbdd00ea4b8c2 (diff)
downloadhdf5-261f8c83611db7b19f3a697720926d825b375a1d.zip
hdf5-261f8c83611db7b19f3a697720926d825b375a1d.tar.gz
hdf5-261f8c83611db7b19f3a697720926d825b375a1d.tar.bz2
[svn-r29560] Remove list and check of flags, defer to library function for checking, which will return an error. That error then produces a HDF5FunctionArgument exception instead of IllegalArgument exception.
Diffstat (limited to 'java/src/jni')
-rw-r--r--java/src/jni/h5pImp.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/java/src/jni/h5pImp.c b/java/src/jni/h5pImp.c
index d542902..ab39739 100644
--- a/java/src/jni/h5pImp.c
+++ b/java/src/jni/h5pImp.c
@@ -2965,16 +2965,10 @@ Java_hdf_hdf5lib_H5_H5Pset_1elink_1acc_1flags(JNIEnv *env, jclass clss, jlong la
{
herr_t retVal = -1;
- if (((unsigned) flags != H5F_ACC_RDWR) &&
- ((unsigned) flags != H5F_ACC_RDONLY) &&
- ((unsigned) flags != H5F_ACC_DEFAULT)) {
- h5badArgument(env, "H5Pset_elink_acc_flags: invalid flags value");
- } /* end if */
- else {
- retVal = H5Pset_elink_acc_flags((hid_t)lapl_id, (unsigned)flags);
- if (retVal < 0)
- h5libraryError(env);
- } /* end else */
+ retVal = H5Pset_elink_acc_flags((hid_t)lapl_id, (unsigned)flags);
+ if (retVal < 0)
+ h5libraryError(env);
+
return (jint) retVal;
} /* end Java_hdf_hdf5lib_H5_H5Pset_1elink_1acc_1flags */