⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@Alexandra-Myers
Copy link
Contributor

The Issue

A NullPointerException is triggered when Adapter tries to patch a ModifyExpressionValue that uses "CONSTANT" as a target as it fails to find the value for target() in the at annotation within the call to MethodContext.getInjectionPointMethodQualifier().

The Proposal

As a ModifyExpressionValue's return value for the mixin method must return the same as its target, rather than using the target's descriptor to get the expected return type, it should be expected to be equivalent to the return type for the mixin method. Therefore, the change is to use the mixin method's descriptor in order to ensure it is never null.

Possible Side Effects

If it were somehow the case that the return type did not match the target for the ModifyExpressionValue it might be possible for this to cause incorrect behaviour, although it seems unlikely.

Alternatives

I had considered instead finding some way to account for specifically the types of the target method, however after careful consideration I figured this solution out as it was far simpler and cleaner than checking what type the target returned.

Su5eD added a commit that referenced this pull request Feb 3, 2026
Co-authored-by: Alexandra-Myers <[email protected]>
@Su5eD Su5eD mentioned this pull request Feb 3, 2026
Su5eD added a commit that referenced this pull request Feb 3, 2026
* Migrate DynFixSliceBoundary to pipeline

* Migrate DynFixAtVariableAssignStore to pipeline

* Migrate DynFixParameterTypeAdapter to pipeline

* Dynamic property containers

* Migrate dynamic fixers to transformation pipeline

* New Patch pipeline and transformer itf

* Migrate away from MethodContext

* Rename definition to core

* Transformer pipeline phases

* Stable frame analysis

* Patch method calls in redirect

* Cleanup TODOs

* Fix frame analysis failing due to incorrect maxs

* Fix plural key application

* Injection point resolver for modified params

* Handle overloaded injection point targets

* Cast replaced inherited parameters to expected type

* Remap parsed literal class targets

* Parse mixins after running class transformers

* Improve overloaded target resolution

* Fix LVLookup incorrect parameter ordinals

* Fix Shared locals param capture

* Use clear target in redirect when possible

* Pipeline Auditing

* Box types in wrap op calls

* Add Combatify test from #6

Co-authored-by: Alexandra-Myers <[email protected]>

* Disable this test in CI
@Su5eD Su5eD closed this in #8 Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant