Comment From: Drezir
Nice refactor. I have one question: why are the synchronizations not needed?
Because the map is already thread friendly.
Comment From: valituguran
Nice refactor. I have one question: why are the synchronizations not needed?
Because the map is already thread friendly.
Indeed the cacheMap is a ConcurrentHashMap and is thread safe.
Comment From: snicoll
Thanks but I'd rather keep the code as it is now, an in particular for anything that's not a straightforward object creation within the lambda bloc.