rmannibucau opened a new pull request, #9538:
URL: https://github.com/apache/hop/pull/9538

   Fixes #9537.
   
   ### Problem
   
   The visibility change in #7387 prevents existing plugin binaries from 
invoking the formerly public `ValueMetaBase(String, int)` constructor.
   The JVM raises `IllegalAccessError` when those plugins reach their 
metadata-construction paths.
   This has been reproduced with unchanged third-party transform and 
workflow-action JARs through normal Hop plugin loading.
   
   ### Change
   
   - Restore public access to the two-argument constructor only.
   - Mark it `@Deprecated(since = "2.21")`, without marking it for removal.
   - Document its binary-compatibility purpose and link to 
`ValueMetaFactory.createValueMeta(String, int)` as the preferred API for new 
code.
   - Preserve the existing constructor delegation and initialization; leave all 
other constructor visibilities unchanged.
   
   This is a narrowly scoped compatibility bridge, not a reversal of the 
recommendation in #6988 to use type-specific value metadata.
   No plugin JARs, vendor-specific code, dependencies, classloader rules, or 
JVM access flags are added to Hop.
   It does not address unrelated incompatibilities or make direct base-class 
construction equivalent to the factory.
   
   ### Regression coverage
   
   Add `ValueMetaBaseCompatibilityTest` in a different package from 
`ValueMetaBase`, with no subclass or reflective-access bypass.
   It directly invokes the constructor for String, Date, and Integer metadata 
and verifies the field name, type, length, precision, and storage defaults.
   It also verifies that the public constructor is deprecated without being 
marked for removal.
   
   Before the visibility fix, the external-package call was confirmed to fail 
compilation with `The constructor ... ValueMetaBase(java.lang.String, int) is 
not visible`.
   With the fix, the regression tests pass.
   
   ### Specific Validation performed
   
   ```sh
   ./mvnw -B -ntp -pl core spotless:apply \
     -Dtest='ValueMeta*Test,RowMeta*Test' package
   
   ./mvnw -B -ntp -pl core \
     spotless:check checkstyle:check apache-rat:check
   ```
   
   - 279 metadata/row tests passed, with no failures, errors, or skipped tests.
   - Spotless, Checkstyle, and RAT passed for the core module.
   - `./mvnw -B -ntp apache-rat:check` also passed across the reactor on a 
clean snapshot of the committed branch.
   - `git diff --check` passed.
   - The freshly source-built branch core was installed into an isolated copy 
of an existing local 2.21 client assembly and used through `hop-run.sh` with 
the two unchanged plugin JARs.
   - The transform and action passed their tested execution paths with 
unchanged plugin JARs, including output, metadata, resource-lifecycle, and 
termination assertions.
   
   The private-plugin end-to-end checks are supplemental local evidence, not 
tests added to the public repository.
   Class-loading logs confirmed the branch-built core and unchanged plugin 
artifacts used in those executions.
   The complete repository `clean install` and a fresh full client assembly 
build were not run.
   The local client smoke runs do not certify all old plugins, GUI Stop, forced 
cancellation, database outages, or all interruption races.
   
   ### Checklist
   
   - [x] Run `apache-rat:check` across the reactor on a clean snapshot of the 
committed branch.
   - [ ] Run the full repository `mvn clean install`; the focused build above 
passed, but a full clean build was not run.
   - [x] Keep the implementation and regression tests focused on the 
demonstrated constructor signature.
   - [x] Link the issue created before this PR: #9537.
   - [x] I hereby declare this contribution to be licensed under the Apache 
License Version 2.0, January 2004.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to