Follow-up hardening for the Embeddium/Sodium XRay compat patch (#54).
- PatchTransformer.injectHead now validates a handler's parameter list
against the forwarded (receiver, args..., CallbackInfo) sequence before
emitting bytecode. Name-only (desc="") patches match by method name
alone, so a handler could bind to a target with a different arity or
primitive parameter types and produce a VerifyError at class load. Such
mismatches are now logged and skipped instead.
- Name-only matching in apply() now resolves the target method name via
getHandlerTargetMethodName(), covering all handler kinds instead of only
Inject/Overwrite.
- BlockOcclusionCachePatch javadoc: drop the stale claim that registration
is guarded by Class.forName() (it is registered unconditionally, and must
be), and clarify that Object params only protect against type mismatches,
not arity mismatches.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>