diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2020-05-06 16:19:50 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2020-05-06 16:19:50 (GMT) |
commit | e0183056d5362f2198726281e446e02912120d4d (patch) | |
tree | 511c495d2f7a62bbbc61d27df3f84ca2cf2a258a /java | |
parent | 286d296aa7ab3085903ad677b3fd3f25e216c84d (diff) | |
download | hdf5-e0183056d5362f2198726281e446e02912120d4d.zip hdf5-e0183056d5362f2198726281e446e02912120d4d.tar.gz hdf5-e0183056d5362f2198726281e446e02912120d4d.tar.bz2 |
Add github actions and cleanup java whitespace
Diffstat (limited to 'java')
-rw-r--r-- | java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java | 2 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/structs/H5O_native_info_t.java | 4 | ||||
-rw-r--r-- | java/src/hdf/hdf5lib/structs/H5O_token_t.java | 2 | ||||
-rw-r--r-- | java/src/jni/h5sImp.c | 2 | ||||
-rw-r--r-- | java/src/jni/h5sImp.h | 2 | ||||
-rw-r--r-- | java/test/TestH5E.java | 38 | ||||
-rw-r--r-- | java/test/TestH5Tparams.java | 2 |
7 files changed, 27 insertions, 25 deletions
diff --git a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java index 8d0cc24..73aaa47 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_hdr_info_t.java @@ -74,7 +74,7 @@ public class H5O_hdr_info_t implements Serializable { if (this.mesg_present != info.mesg_present) return false; if (this.mesg_shared != info.mesg_shared) - return false; + return false; return true; } diff --git a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java index 4e80849..f410a7f 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_native_info_t.java @@ -22,7 +22,7 @@ public class H5O_native_info_t implements Serializable { public H5O_hdr_info_t hdr_info; /* Object header information */ /* Extra metadata storage for obj & attributes */ - public H5_ih_info_t obj_info; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ + public H5_ih_info_t obj_info; /* v1/v2 B-tree & local/fractal heap for groups, B-tree for chunked datasets */ public H5_ih_info_t attr_info; /* v2 B-tree & heap for attributes */ H5O_native_info_t (H5O_hdr_info_t oheader_info, H5_ih_info_t obj_info, H5_ih_info_t attr_info) @@ -49,4 +49,4 @@ public class H5O_native_info_t implements Serializable { return true; } -}
\ No newline at end of file +} diff --git a/java/src/hdf/hdf5lib/structs/H5O_token_t.java b/java/src/hdf/hdf5lib/structs/H5O_token_t.java index 8ec0b7f..e6d2474 100644 --- a/java/src/hdf/hdf5lib/structs/H5O_token_t.java +++ b/java/src/hdf/hdf5lib/structs/H5O_token_t.java @@ -42,4 +42,4 @@ public class H5O_token_t implements Serializable { return Arrays.equals(this.data, token.data); } -}
\ No newline at end of file +} diff --git a/java/src/jni/h5sImp.c b/java/src/jni/h5sImp.c index 33d3c2b..3498392 100644 --- a/java/src/jni/h5sImp.c +++ b/java/src/jni/h5sImp.c @@ -165,7 +165,7 @@ done: /* 10/28/99 -- added code to copy the array -- this is not used, * but serves as a reminder in case we try to implement this in * the future.... - */ + */ /* * Note: the argument coord is actually long coord[][], which has been * flattened by the caller. diff --git a/java/src/jni/h5sImp.h b/java/src/jni/h5sImp.h index a07d4c5..cea2ebf 100644 --- a/java/src/jni/h5sImp.h +++ b/java/src/jni/h5sImp.h @@ -52,7 +52,7 @@ Java_hdf_hdf5lib_H5__1H5Scopy /* 10/28/99 -- added code to copy the array -- this is not used, * but serves as a reminder in case we try to implement this in * the future.... - */ + */ /* * Note: the argument coord is actually long coord[][], which has been * flattened by the caller. diff --git a/java/test/TestH5E.java b/java/test/TestH5E.java index 6f4f473..ac641c3 100644 --- a/java/test/TestH5E.java +++ b/java/test/TestH5E.java @@ -81,6 +81,7 @@ public class TestH5E { long errnum = hdferr.getMajorErrorNumber(); int[] error_msg_type = { HDF5Constants.H5E_MAJOR }; String msg = null; + try { msg = H5.H5Eget_msg(errnum, error_msg_type); } @@ -91,15 +92,15 @@ public class TestH5E { assertNotNull("H5.H5Eget_msg: " + msg, msg); assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MAJOR, error_msg_type[0]); - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector and the error string might be different. - * Only check for the specific error message if the native - * connector is being used. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) - assertEquals("H5.H5Eget_msg: ", "File accessibility", msg); + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error string might be different. + * Only check for the specific error message if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertTrue("H5.H5Eget_msg: ", msg.contains("File accessibility")); } catch (Throwable err) { err.printStackTrace(); @@ -116,6 +117,7 @@ public class TestH5E { long errnum = hdferr.getMinorErrorNumber(); int[] error_msg_type = { HDF5Constants.H5E_MINOR }; String msg = null; + try { msg = H5.H5Eget_msg(errnum, error_msg_type); } @@ -126,15 +128,15 @@ public class TestH5E { assertNotNull("H5.H5Eget_msg: " + msg, msg); assertEquals("H5.H5Eget_msg: ", HDF5Constants.H5E_MINOR, error_msg_type[0]); - /* - * If HDF5_VOL_CONNECTOR is set, this might not be the - * native connector and the error string might be different. - * Only check for the specific error message if the native - * connector is being used. - */ - String connector = System.getenv("HDF5_VOL_CONNECTOR"); - if (connector == null) - assertEquals("H5.H5Eget_msg: ", "Unable to open file", msg); + /* + * If HDF5_VOL_CONNECTOR is set, this might not be the + * native connector and the error string might be different. + * Only check for the specific error message if the native + * connector is being used. + */ + String connector = System.getenv("HDF5_VOL_CONNECTOR"); + if (connector == null) + assertTrue("H5.H5Eget_msg: ", msg.contains("Unable to open file")); } catch (Throwable err) { err.printStackTrace(); diff --git a/java/test/TestH5Tparams.java b/java/test/TestH5Tparams.java index 8baccd1..f2b5ab5 100644 --- a/java/test/TestH5Tparams.java +++ b/java/test/TestH5Tparams.java @@ -274,7 +274,7 @@ public class TestH5Tparams { public void testH5Tpack_invalid() throws Throwable { H5.H5Tpack(-1); } - + @Test(expected = HDF5LibraryException.class) public void testH5Treclaim_invalid() throws Throwable { byte[] buf = new byte[2]; |