SpongePowered / Mixin

Mixin is a trait/mixin and bytecode weaving framework for Java using ASM
MIT License
1.37k stars 185 forks source link

Add stack checking to old `Target#findInitNodeFor` overload and un-deprecate it. #667

Closed LlamaLad7 closed 3 weeks ago

LlamaLad7 commented 2 months ago

Implements my requested changes from here: The only reason MixinExtras uses this method is to match Redirect's behaviour, so I would like it to be kept in line with that. Additionally, there is nothing wrong with not checking the desc as long as you've definitely found the right NEW insn, which the injection point handles itself.

Mumfrey commented 2 months ago

Ah I only added this back because I saw MixinExtras was calling it and didn't realise why. If that's the case then the method should just be an overload which supplies a null value for desc, since desc is not checked if it's null.

LlamaLad7 commented 2 months ago

Done.