Page 1 of 1

About Question enthuware.ocpjp.v8.2.1510 :

Posted: Mon Mar 28, 2016 2:48 pm
by javalass
Synchronizing on this may not help if the same cache object is exposed in any other class. synchronized(cache){   ... } is a possible solution.
Not really because some other code could modify cache directly, bypassing the synchronised block.

Re: About Question enthuware.ocpjp.v8.2.1510 :

Posted: Mon Mar 28, 2016 8:58 pm
by admin
Updated explanation to include this point.
thank you for your feedback!
Paul.