...
Wiki Markup |
---|
The _Java Language Specification_ \[java:[JLS 2005|AA. Bibliography#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. Bibliography#API 06]\], {{public final int ordinal()}}: |
...
Rule | Severity | Likelihood | Remediation Cost | Priority | Level |
---|---|---|---|---|---|
DCL04-J | low | probable | medium | P4 | L3 |
Related Guidelines
"INT09-C. Ensure enumeration constants map to unique values" | ||||
"INT09-CPP. Ensure enumeration constants map to unique values" | ||||
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="57e1f493d10c45d2-64954f6d-44454dd8-88298b04-7a4e102d7241dcdd8e7ea35f"><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="1334026792023780-c0e55864-45814b7b-98829a66-bfa4e7e3edf7d9e5d2d2c7f0"><ac:plain-text-body><![CDATA[ | [java:[JLS 2005 | AA. Bibliography#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="769b85555103b51a-8fbcc250-4b5449dc-80959e14-d95003406507106d5ad08502"><ac:plain-text-body><![CDATA[ | [java:[API 2006 | AA. Bibliography#API 06]] | [Enum | http://download.oracle.com/javase/6/docs/api/java/lang/Enum.html] | ]]></ac:plain-text-body></ac:structured-macro> |
...