Committing clang-format changes

This commit is contained in:
github-actions
2026-06-22 09:27:40 -05:00
committed by Scot Breitenfeld
parent c0b10b129d
commit e6e681ac63
6 changed files with 53 additions and 41 deletions
+6 -6
View File
@@ -12546,7 +12546,7 @@ public class H5 implements java.io.Serializable {
else {
/* Pass 2: allocate exact buffer and populate */
MemorySegment buf = arena.allocate(plen + 1);
retVal = (int)mh.invokeExact(plist_id, idx, buf, plen + 1, plen_seg);
retVal = (int)mh.invokeExact(plist_id, idx, buf, plen + 1, plen_seg);
if (retVal >= 0)
params[0] = buf.getString(0);
}
@@ -23851,11 +23851,11 @@ public class H5 implements java.io.Serializable {
if (status < 0)
h5libraryError();
int id = (int)idHandle.get(infoSeg, 0L);
int config_flags = (int)flagsHandle.get(infoSeg, 0L);
boolean has_set_config = (boolean)hasSetConfigHandle.get(infoSeg, 0L);
boolean has_get_config = (boolean)hasGetConfigHandle.get(infoSeg, 0L);
boolean has_blob_callbacks = (boolean)hasBlobCallbacksHandle.get(infoSeg, 0L);
int id = (int)idHandle.get(infoSeg, 0L);
int config_flags = (int)flagsHandle.get(infoSeg, 0L);
boolean has_set_config = (boolean)hasSetConfigHandle.get(infoSeg, 0L);
boolean has_get_config = (boolean)hasGetConfigHandle.get(infoSeg, 0L);
boolean has_blob_callbacks = (boolean)hasBlobCallbacksHandle.get(infoSeg, 0L);
MemorySegment namePtr = (MemorySegment)nameHandle.get(infoSeg, 0L);
String name = (namePtr == null || namePtr.equals(MemorySegment.NULL))
@@ -37,12 +37,12 @@ public class H5Z_class_info_t implements Serializable {
public H5Z_class_info_t(int id, int config_flags, String name, String description, boolean has_set_config,
boolean has_get_config, boolean has_blob_callbacks)
{
this.id = id;
this.config_flags = config_flags;
this.name = name;
this.description = description;
this.has_set_config = has_set_config;
this.has_get_config = has_get_config;
this.has_blob_callbacks = has_blob_callbacks;
this.id = id;
this.config_flags = config_flags;
this.name = name;
this.description = description;
this.has_set_config = has_set_config;
this.has_get_config = has_get_config;
this.has_blob_callbacks = has_blob_callbacks;
}
}
@@ -37,12 +37,12 @@ public class H5Z_class_info_t implements Serializable {
public H5Z_class_info_t(int id, int config_flags, String name, String description, boolean has_set_config,
boolean has_get_config, boolean has_blob_callbacks)
{
this.id = id;
this.config_flags = config_flags;
this.name = name;
this.description = description;
this.has_set_config = has_set_config;
this.has_get_config = has_get_config;
this.has_blob_callbacks = has_blob_callbacks;
this.id = id;
this.config_flags = config_flags;
this.name = name;
this.description = description;
this.has_set_config = has_set_config;
this.has_get_config = has_get_config;
this.has_blob_callbacks = has_blob_callbacks;
}
}
+30 -17
View File
@@ -188,7 +188,11 @@ public class TestH5Z {
}
finally {
if (dcpl_id != HDF5Constants.H5I_INVALID_HID)
try { H5.H5Pclose(dcpl_id); } catch (Exception e) { /* ignore */ }
try {
H5.H5Pclose(dcpl_id);
}
catch (Exception e) { /* ignore */
}
}
}
@@ -209,11 +213,12 @@ public class TestH5Z {
assertEquals("nfilters after H5Pappend_filter", 1, nfilters);
// Verify the cd_values round-trip via H5Pget_filter2.
int[] cd_out = new int[1];
int[] flags_out = new int[1];
long[] cd_nelmts = new long[] {1};
int[] cd_out = new int[1];
int[] flags_out = new int[1];
long[] cd_nelmts = new long[] {1};
String[] name_out = new String[] {""};
int filter_id = H5.H5Pget_filter2(dcpl_id, 0, flags_out, cd_nelmts, cd_out, 256, name_out, null);
int filter_id =
H5.H5Pget_filter2(dcpl_id, 0, flags_out, cd_nelmts, cd_out, 256, name_out, null);
assertEquals("filter id from H5Pget_filter2", HDF5Constants.H5Z_FILTER_DEFLATE, filter_id);
assertEquals("cd_nelmts", 1L, cd_nelmts[0]);
assertEquals("cd_values[0] (deflate level)", 9, cd_out[0]);
@@ -225,7 +230,11 @@ public class TestH5Z {
}
finally {
if (dcpl_id != HDF5Constants.H5I_INVALID_HID)
try { H5.H5Pclose(dcpl_id); } catch (Exception e) { /* ignore */ }
try {
H5.H5Pclose(dcpl_id);
}
catch (Exception e) { /* ignore */
}
}
}
@@ -241,7 +250,7 @@ public class TestH5Z {
assertTrue("H5Pappend_filter shuffle", ret >= 0);
String[] params = new String[1];
int retval = H5.H5Pget_filter_params_by_idx(dcpl_id, 0, params);
int retval = H5.H5Pget_filter_params_by_idx(dcpl_id, 0, params);
assertTrue("H5Pget_filter_params_by_idx returned non-negative", retval >= 0);
assertNotNull("params[0] is non-null", params[0]);
}
@@ -251,7 +260,11 @@ public class TestH5Z {
}
finally {
if (dcpl_id != HDF5Constants.H5I_INVALID_HID)
try { H5.H5Pclose(dcpl_id); } catch (Exception e) { /* ignore */ }
try {
H5.H5Pclose(dcpl_id);
}
catch (Exception e) { /* ignore */
}
}
}
@@ -261,7 +274,7 @@ public class TestH5Z {
try {
String cfg = "level = 6";
long[] val = new long[1];
int ret = H5.H5Zconfig_get_int(cfg, "level", val);
int ret = H5.H5Zconfig_get_int(cfg, "level", val);
assertTrue("H5Zconfig_get_int returned non-negative", ret >= 0);
assertEquals("H5Zconfig_get_int value", 6L, val[0]);
}
@@ -275,9 +288,9 @@ public class TestH5Z {
public void testH5Zconfig_get_param_double()
{
try {
String cfg = "scale = 1.5";
String cfg = "scale = 1.5";
double[] val = new double[1];
int ret = H5.H5Zconfig_get_double(cfg, "scale", val);
int ret = H5.H5Zconfig_get_double(cfg, "scale", val);
assertTrue("H5Zconfig_get_double returned non-negative", ret >= 0);
assertEquals("H5Zconfig_get_double value", 1.5, val[0], 1e-10);
}
@@ -291,14 +304,14 @@ public class TestH5Z {
public void testH5Zconfig_get_param_bool()
{
try {
String cfg = "lossless = true";
String cfg = "lossless = true";
boolean[] val = new boolean[1];
int ret = H5.H5Zconfig_get_bool(cfg, "lossless", val);
int ret = H5.H5Zconfig_get_bool(cfg, "lossless", val);
assertTrue("H5Zconfig_get_bool returned non-negative", ret >= 0);
assertTrue("H5Zconfig_get_bool value", val[0]);
String cfg2 = "lossless = false";
int ret2 = H5.H5Zconfig_get_bool(cfg2, "lossless", val);
int ret2 = H5.H5Zconfig_get_bool(cfg2, "lossless", val);
assertTrue("H5Zconfig_get_bool (false) returned non-negative", ret2 >= 0);
assertFalse("H5Zconfig_get_bool value (false)", val[0]);
}
@@ -312,9 +325,9 @@ public class TestH5Z {
public void testH5Zconfig_get_param_str()
{
try {
String cfg = "mode = \"fast\"";
String cfg = "mode = \"fast\"";
String[] val = new String[1];
int ret = H5.H5Zconfig_get_str(cfg, "mode", val);
int ret = H5.H5Zconfig_get_str(cfg, "mode", val);
assertTrue("H5Zconfig_get_str returned non-negative", ret >= 0);
assertEquals("H5Zconfig_get_str value", "fast", val[0]);
}
@@ -330,7 +343,7 @@ public class TestH5Z {
try {
String cfg = "level = 5";
long[] val = new long[1];
int ret = H5.H5Zconfig_get_int(cfg, "missing_key", val);
int ret = H5.H5Zconfig_get_int(cfg, "missing_key", val);
assertTrue("H5Zconfig_get_int with missing key returns 0 (not found)", ret == 0);
}
catch (Throwable err) {
+1 -2
View File
@@ -1892,8 +1892,7 @@ H5Pappend_filter(hid_t plist_id, H5Z_filter_t filter, unsigned int flags, const
/* Re-validate flags: the callback may have modified them */
if (flags & ~((unsigned)H5Z_FLAG_DEFMASK))
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL,
"set_config callback returned invalid flags");
HGOTO_ERROR(H5E_ARGS, H5E_BADVALUE, FAIL, "set_config callback returned invalid flags");
}
}
else {
+2 -2
View File
@@ -298,8 +298,8 @@ parse_filter(const char *str, unsigned *n_objs, filter_info_t *filt, pack_opt_t
}
num[nlen] = '\0';
{
char *end;
long id_val = strtol(num, &end, 10);
char *end;
long id_val = strtol(num, &end, 10);
if (*end != '\0' || id_val < 0 || id_val > H5Z_FILTER_MAX) {
if (obj_list)
free(obj_list);