Hi Damien, On Sat, May 18, 2013 at 12:32:00AM +0200, Damien Raude-Morvan wrote: > Thanks for your analysis of this issue and your provided workaround. > I'm a bit reluctant to apply your patch as-is because, in fact, upstream > added "createInfo = null;" to fix > http://sourceforge.net/p/cglib/bugs/28/
I've seen this Bugreport as well, but I don't believe setting createInfo to null fixes this bug, they need to run static Initializers as suggested in the Bugreport. Anyway, I extracted the changes made for fixing the mentioned bug. I believe the real fix is made in net.sf.cglib.core.ReflectUtils and the changes in MethodProxy are merely accidental. I am attaching the changes made. Lastly, createInfo is not accessed after init() is run, according to my analysis. So not setting it to null just uses a little more heap than necessary. > I'll check with them how to fix this properly... They're probably going to tell you to fix mockito. Well, I would tell you. See lines 19-32 on https://github.com/mockito/mockito/blob/master/src/org/mockito/internal/creation/cglib/MockitoNamingPolicy.java Mockito is accessing a private member variable via reflection and failing loudly if it cannot. My first priority is fixing mockito in Debian, including wheezy. But fixing mockito is more complicated, as far as I see. So, my plan of action is as follows: 1. Get a cglib with my patch accepted for the next pointrelease 2. After 1., revert the patch and issue a bug report against mockito. 3. Fix the issue in mockito, probably pushing the patch upstream. Geez, I wish i could assign this bug to both cglib and mockito. Greetings Stefan -- "A troll. Stupid but hard to fool. I'm afraid i shall have to try the truth" "Vy vill zat vork?" "He's a Policeman The truth usually confuses them. They don't often hear it." (William and Otto) [Terry Pratchett, The truth]
signature.asc
Description: Digital signature