Not really because some other code could modify cache directly, bypassing the synchronised block.Synchronizing on this may not help if the same cache object is exposed in any other class. synchronized(cache){ ... } is a possible solution.
About Question enthuware.ocpjp.v8.2.1510 :
Moderators: Site Manager, fjwalraven
-
- Posts: 54
- Joined: Thu Mar 03, 2016 1:26 pm
- Contact:
About Question enthuware.ocpjp.v8.2.1510 :
-
- Site Admin
- Posts: 10388
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v8.2.1510 :
Updated explanation to include this point.
thank you for your feedback!
Paul.
thank you for your feedback!
Paul.
Who is online
Users browsing this forum: No registered users and 6 guests