Files
hdf5/java/test
Scot Breitenfeld 39fa3e5538 Add Java bindings for H5Pmodify_filter_by_idx
Implements the two overloads specified in RFC-HDFG-2026-001
sec:modify-bindings -- one taking a String, one an int[] -- mirroring
the existing H5Pappend_filter overloads.

Both Java binding paths are covered, since the tree maintains two:

  - JNI (java/src-jni): two private native methods dispatched from the
    public overloads, plus the JNI implementations and declarations in
    h5pDCPLImp.c/.h, following the H5Pappend_filter_str/_raw pattern
    exactly.

  - Panama/FFM (java/hdf): the H5Z_params_t struct is built directly in
    an Arena and passed to the generated org.hdfgroup.javahdf5.hdf5_h
    downcall, as the append string form already does. Unlike the append
    case the cd_values form cannot delegate to H5Pmodify_filter, which
    addresses an entry by filter ID and resolves to the first match
    rather than by index, so it constructs the struct explicitly. The
    generated binding is produced by jextract from the public headers,
    so it picks up the new declaration automatically.

Adds testH5Pmodify_filter_by_idx_string and
testH5Pmodify_filter_by_idx_cdvalues to TestH5Z.java and updates the
JUnit golden file. Placement and the test count were derived from
@FixMethodOrder(MethodSorters.NAME_ASCENDING) rather than guessed, and
the file's surrounding format is unchanged.

Not compile-verified locally: this configuration has HDF5_BUILD_JAVA
OFF and the machine has a JRE but no JDK (no javac) and no jextract, so
nothing under java/ can be built here. The C library still builds clean
and the full C/Fortran suite is unchanged. What was checked statically:
the JNI symbol names against the mangling rule (underscores in the Java
method name become _1) and against the existing append pair; the
H5Z_params_t offsets (int type at 0, union at 8, cd_nelmts at 8,
cd_values at 16, 24 bytes total on 64-bit) and the enum values
(H5Z_PARAMS_CDVALUES 0, H5Z_PARAMS_STRING 1) against H5Zpublic.h; and
the H5Pget_filter call in the new test against the working call in
testH5Pappend_filter_cdvalues. Java CI should be treated as the real
gate.
2026-08-20 23:12:06 -05:00
..