Skip to content

Latest commit

 

History

History
10 lines (7 loc) · 770 Bytes

README.MD

File metadata and controls

10 lines (7 loc) · 770 Bytes

Lambda instantiation order vs. class redefinition

Inspired by https://habr.com/company/odnoklassniki/blog/429040/ (in Russian).

Changing lambda instantiation order while not prevent class redefinition via Instrumentation API may lead to some tricky bugs.

Lambda's bodies live inside synthetic methods of the enclosing class and referred from lambda instance by their names in the form of lambda$0. In case we change order of lambda instantiation above mentioned method names may be reassigned according to the program order. This, in turn, may lead to wrong lambda calls.