Versions Compared

Key

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

...

Wiki Markup
Improper use of {{public static}} fields can also result in type safety issues. For example, untrusted code can supply an unexpected subtype when the variable is defined to be of a more general type, such as {{java.lang.Object}} \[[Gong 2003|AA. Bibliography#Gong 03]\]. ThereforeAs a result classes must not contain non-final public staticcstatic fields.

Noncompliant Code Example

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="8b10ec1ddf0eb1f9-35fc2a06-46714bbb-91e082ba-276c6ee6339e8285255b9fbb"><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="7eaebe2cde2c0296-81a13846-46d54160-a5baa699-52ecbd6fc6ebe8bc33a9a083"><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="1d317dd9b38f25b7-1bd102e0-4ef54b05-87799dfc-aef1b1d55338ff92a422ea33"><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="a73ae216f394024e-6a184c47-47384ec7-88018920-9689be540d8693f63cb7202c"><ac:plain-text-body><![CDATA[

[[Sterbenz 2006

AA. Bibliography#Sterbenz 06]]

Antipattern 5, Misusing Public Static Variables

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

...