Incorrect remapping of Class#getMethod
regarding parameterTypes
#11052
Labels
status: accepted
Disputed bug is accepted as valid or Feature accepted as desired to be added.
type: bug
Something doesn't work as it was intended to.
version: 1.21
Game version 1.21
Expected behavior
No error, correct handling of null as described in the javadocs.
Observed/Actual behavior
You can check out this original issue zeshan321/ActionHealth#67
Steps/models to reproduce
Run remapped
Class#getMethod
with a nullparameterTypes
.You can try with the described problem below:
Entity.class.getMethod("getName", (Class<?>[]) null)
.Example: https://github.com/zeshan321/ActionHealth/blob/6226feeb3233bd1500f184a87b08480b0e3c028c/src/main/java/com/zeshanaslam/actionhealth/utils/HealthUtil.java#L245C27-L245C85
Plugin and Datapack List
Paper version
Other
Currently there is no handling of null values, might be nice to support them.
https://github.com/PaperMC/Paper/blob/master/patches/server/0022-Remap-reflection-calls-in-plugins-using-internals.patch#L481
Thanks :D
If you need more details do not hesitate.
The text was updated successfully, but these errors were encountered: