...
In the presence of multiple threads, non-final public static fields can be modified in inconsistent ways. See rule TSM01-J. Do not let the ( this ) reference escape during object construction for an example.
Wiki Markup |
---|
Improper use of public static fields can also result in type-safety issues. For example, untrusted code can supply an unexpected subtype with malicious methods when the variable is defined to be of a more general type, such as {{java.lang.Object}} \[[Gong 2003|AA. Bibliography#Gong 03]\]. As a result, classes must not contain nonfinal public static fields. |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="185356cbc6b5a1c7-c0e185bc-46524cac-99ebb98f-88d267bdcecf53fffdf064c1"><ac:plain-text-body><![CDATA[ | [[FT 2008 | AA. Bibliography#FT 08]] | Function Table, Class Function Table | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ab2a6688a297f7d8-7347ac23-402a4863-ac3fb1f3-4201afda6f4d7be7bf50058e"><ac:plain-text-body><![CDATA[ | [[Gong 2003 | AA. Bibliography#Gong 03]] | 9.3, Static Fields | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="ae83da9ee9ebb29f-865c6245-464c4d85-bf0292be-0f8ae4a1ed9a02884403e697"><ac:plain-text-body><![CDATA[ | [[Nisewanger 2007 | AA. Bibliography#Nisewanger 07]] | Antipattern 5, Misusing Public Static Variables | ]]></ac:plain-text-body></ac:structured-macro> |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="26c6e5ea37dba6de-07282f5c-428d437b-aba2b2ff-28162b203b113f6b494781c9"><ac:plain-text-body><![CDATA[ | [[Sterbenz 2006 | AA. Bibliography#Sterbenz 06]] | Antipattern 5, Misusing Public Static Variables | ]]></ac:plain-text-body></ac:structured-macro> |
...