Versions Compared

Key

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

...

Wiki Markup
The _Java Language Specification_ \[java:[JLS 2005|AA. References#JLS 05]\]  [§8.9, "Enums,"|http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9] does not specify the use of {{ordinal()}} in programs. However, using the {{ordinal()}} method to derive the value associated with an {{enum}} constant is error prone and should be avoided. 

Wiki Markup
According to the Java API \[java:[API 2006|AA. References#API 06]\], {{public final int ordinal()}}:

...

The CERT C Secure Coding Standard

INT09-C. Ensure enumeration constants map to unique values

The CERT C++ Secure Coding Standard

INT09-CPP. Ensure enumeration constants map to unique values

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="a52f85e7d056146e-d9b49fc4-48ab467b-95e2ab5c-267b6ba8ee5a1d55aafae3c0"><ac:plain-text-body><![CDATA[

[ISO/IEC TR 24772:2010

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

"Enumerator Issues [java:CCB]"

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

...

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c03279abd025c04a-d826ea15-42ac451c-80f994d9-06592ef80ab6c3730b9d5d4d"><ac:plain-text-body><![CDATA[

[java:[JLS 2005

AA. References#JLS 05]]

[§8.9, "Enums"

http://java.sun.com/docs/books/jls/third_edition/html/classes.html#8.9]

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

<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="30947941884f44bf-db4422d2-439a4fa7-978aa9cd-533e6676b9bf0c7eb11d1ebd"><ac:plain-text-body><![CDATA[

[java:[API 2006

AA. References#API 06]]

[Enum

http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html]

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

...