Found on StackOverflow:
http://stackoverflow.com/q/12403658/116472
We have a critical issue with RequestFactory (AutoBeans actually): we use static HashMaps as shared caches without any synchronization!
Short-term fix: because neither ConcurrentHashMap or Collections.synchronizedMap are emulated (and this is in shared code), add objects (new Object()) and synchronized blocks around accesses to those maps.
Long-term fix: we should probably emulate ConcurrentHashMap and/or Collections.synchronizedMap as "no-ops" (ConcurrentHashMap has a simple wrapper around HashMap or something similar, and Collections.synchronizedMap returning its argument unchanged; I don't know yet what should be used here, as I haven't yet looked closely at the code that makes use of these static maps)
Alternatively, we could emulate Collections.synchronizedXxx methods as no-ops and use that in AutoBeans with synchronized blocks, as a short/middle-term fix (or maybe long-term too).
And by short-term I mean 2.5.0. Do you think it would be possible?
(and by possible, I mean: if I send a patch later today, are there chances it'll be integrated into RC2?)