...
In this compliant solution, changeValue()
obtains a lock on a private static Object
that is inaccessible to the caller.
Exceptions
LCK00-EX0: A class may violate this rule when all of the following conditions are met:
...
- Neither the client class nor any other class in the system passes objects of the violating class to untrusted code.
- The violating class cannot invoke methods, directly or indirectly, from untrusted classes that violate this rule.
LCK00-EX1: When a superclass of the class documents that it supports client-side locking and synchronizes on its class object, the class can support client-side locking in the same way and document this policy.
LCK00-EX2: Package-private classes are exempt from this rule because their accessibility protects against untrusted callers. However, use of this exemption should be documented explicitly to ensure that trusted code within the same package neither reuses the lock object nor changes the lock object inadvertently.
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="3cfbc8179704e575-cd7c0b49-4ce64b09-86e1aea3-f26c2bced9a072d10edfd02c"><ac:plain-text-body><![CDATA[ | [[Bloch 2001 | AA. Bibliography#Bloch 01]] | Item 52. Document Thread Safety | ]]></ac:plain-text-body></ac:structured-macro> |
...