Wiki Markup |
---|
According to [§12§12.4, "Initialization of Classes and Interfaces" |http://java.sun.com/docs/books/jls/third_edition/html/execution.html#12.4] of the _Java Language Specification_ \[[JLS 2005|AA. Bibliography#JLS 05]\] |
...
Wiki Markup |
---|
In other words, the presence of a {{static}} field triggers the initialization of a class. However, a static field could depend on the initialization of a class, possibly creating an initialization cycle. The _Java Language Specification_ also states in [§8§8.3.2.1, "Initializers for Class Variables" |http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.3.2.1] \[[JLS 2005|AA. Bibliography#JLS 05]\] |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f86ad5630dedbf6c-f1eb16a0-4f17460b-9ca4ac2f-16576cf53c3df1efa5b25401"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS 05]] | [§8§8.3.2.1, "Initializers for Class Variables" | http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.3.2.1] | ]]></ac:plain-text-body></ac:structured-macro> |
| |||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="14ee22dbc46cd9f8-042cb4ae-43cb4656-b19995ea-562893ed42acfa6116a70215"><ac:plain-text-body><![CDATA[ | [[Bloch 2005 | AA. Bibliography#Bloch 05]] | Puzzle 49: Larger Than Life | ]]></ac:plain-text-body></ac:structured-macro> | |
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="44beae2399312665-f1612d62-47534a13-85048238-bb47ebc6800548fb836a1d67"><ac:plain-text-body><![CDATA[ | [[MITRE 2009 | AA. Bibliography#MITRE 09]] | [CWE ID 665 | http://cwe.mitre.org/data/definitions/665.html] "Improper Initialization" | ]]></ac:plain-text-body></ac:structured-macro> |
...
DCL03-J. Do not derive a value associated with an enum from its ordinal 01. Declarations and Initialization (DCL) DCL13DCL05-J. Avoid cyclic dependencies between packagesDo not reuse public identifiers from the Java Standard Library