Guidelines
DCL00-J. Use visually distinct identifiers
DCL01-J. Do not declare more than one variable per declaration
DCL02-J. Use meaningful symbolic constants to represent literal values in program logic
DCL03-J. Properly encode relationships in constant definitions
DCL04-J. Declare mathematical constants as static and final
DCL05-J. Do not attempt to assign to the loop variable in an enhanced for loop
DCL06-J. Use 'L', not 'l', to indicate a long value
DCL07-J. Beware of integer literals beginning with '0'
DCL08-J. Avoid overloading varargs methods
DCL09-J. Enable compile-time type checking of varargs types
DCL10-J. Ensure proper initialization by declaring class and instance variables final
DCL11-J. Never derive a value associated with an enum from its ordinal
Risk Assessment Summary
Guideline |
Severity |
Likelihood |
Remediation Cost |
Priority |
Level |
|---|---|---|---|---|---|
DCL00-J |
low |
unlikely |
medium |
P2 |
L3 |
DCL01-J |
low |
unlikely |
low |
P3 |
L3 |
DCL02-J |
low |
unlikely |
high |
P1 |
L3 |
DCL03-J |
low |
unlikely |
high |
P1 |
L3 |
DCL04-J |
low |
probable |
high |
P2 |
L3 |
DCL05-J |
low |
unlikely |
low |
P3 |
L3 |
DCL06-J |
low |
unlikely |
low |
P3 |
L3 |
DCL07-J |
low |
unlikely |
low |
P3 |
L3 |
DCL08-J |
low |
unlikely |
medium |
P2 |
L3 |
DCL09-J |
low |
unlikely |
medium |
P2 |
L3 |
DCL10-J |
low |
probable |
medium |
P4 |
L3 |
DCL11-J |
low |
probable |
medium |
P4 |
L3 |
SEC21-J. Remove superfluous code from privileged blocks The CERT Oracle Secure Coding Standard for Java DCL00-J. Use visually distinct identifiers