Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Wiki Markup
Therefore, the presence of a {{static}} field can triggertriggers the initialization of a class. However, a static field could depend on the initialization of another class, possibly creating an initialization cycle. The JLS also states in [§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. References#JLS 05]\]

...

The CERT C++ Secure Coding Standard

DCL14-CPP. Avoid assumptions about the initialization order between translation units

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="f911140a4bd839a2-f5809b8e-403d451c-a39bb7de-b3f87dff8e11492d39b2ed0d"><ac:plain-text-body><![CDATA[

[ISO/IEC TR 24772:2010

http://www.aitcnet.org/isai/]

Initialization of variables [LAV]

]]></ac:plain-text-body></ac:structured-macro>

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="7984e25cd90a23ea-24632a18-49d84ca9-bcce9de0-af0996a0f6c4f51fdbcb2de1"><ac:plain-text-body><![CDATA[

[[JLS 2005

AA. References#JLS 05]]

[§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>

 

§12.4, Initialization of Classes and Interfaces

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8364337e50cb6521-a4c41ea5-47fd4a65-b2fabab0-06b914776505e22dd76cce3d"><ac:plain-text-body><![CDATA[

[[Bloch 2005

AA. References#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="93018e49256bc2c5-07599efb-46104f7a-8c739d79-cf7c152751f514143b3779c2"><ac:plain-text-body><![CDATA[

[[MITRE 2009

AA. References#MITRE 09]]

[CWE-665

http://cwe.mitre.org/data/definitions/665.html]. Improper initialization

]]></ac:plain-text-body></ac:structured-macro>

...