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 with malicious methods when the variable is defined to be of a more general type, such as {{java.lang.Object}} \[[Gong 2003|AA. Bibliography#GongReferences#Gong 03]\]. As a result, classes must not contain nonfinal public static fields.

...

Wiki Markup
This noncompliant code example is adopted from JDK v1.4.2 \[[FT 2008|AA. Bibliography#FTReferences#FT 08]\]. It declares a function table containing a public static field.

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="2de73b35b2a559a2-840f9c89-403d43a1-a4f98acb-2033a87814a6e6f1a0cf1618"><ac:plain-text-body><![CDATA[

[[FT 2008

AA. Bibliography#FT References#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="e6070387cf2d8c1a-6a9ab7c9-494a4596-ae53a016-55e22e9fa835d3c70b9417db"><ac:plain-text-body><![CDATA[

[[Gong 2003

AA. Bibliography#Gong References#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="9499ddaa3c6d40c5-8c6429a8-4bf746a0-b509b14a-538caf04755730d35182a6cf"><ac:plain-text-body><![CDATA[

[[Nisewanger 2007

AA. Bibliography#Nisewanger References#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="540f2caffdcd7366-ff5e5410-4e994527-93d28247-adcc97bf76294f906ff9487d"><ac:plain-text-body><![CDATA[

[[Sterbenz 2006

AA. Bibliography#Sterbenz References#Sterbenz 06]]

Antipattern 5, Misusing Public Static Variables

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

...