aucd29 / cloning

Automatically exported from code.google.com/p/cloning
Other
0 stars 0 forks source link

The isImmutable cache isn't always used #28

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I noticed in Cloner.isImmutable only caches @Immutable if it finds one, not if 
it doesn't.

Should be enough with:
if (b != null) return b; // at the top
immutables.put(clz, Boolean.FALSE); //just before it returns false

Original issue reported on code.google.com by j...@mojang.com on 19 May 2014 at 8:23

GoogleCodeExporter commented 9 years ago
Yes this is a good point. Please have a look as I'm seeing my threads block on 
getDeclaredAnnotations() over and over again.

Original comment by m...@thebishops.org on 16 Sep 2014 at 10:22