Skip to main content
assistive.skiplink.to.breadcrumbs
assistive.skiplink.to.header.menu
assistive.skiplink.to.action.menu
assistive.skiplink.to.quick.search
Log in
Confluence
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
SEI CERT Oracle Coding Standard for Java
Pages
Boards
Space shortcuts
Dashboard
Secure Coding Home
Android
C
C++
Java
Perl
Page tree
Browse pages
Configure
Space tools
A
t
tachments (0)
Page History
Page Information
Resolved comments
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
Old Categories
Jira links
2. Defensive Programming
Created by
Carol J. Lallier
, last modified by
David Svoboda
on
Oct 20, 2014
Defensive Programming: Introduction
Page:
CON52-J. Document thread-safety and use annotations where applicable
Page:
DCL53-J. Minimize the scope of variables
Page:
DCL56-J. Do not attach significance to the ordinal associated with an enum
Page:
DCL58-J. Enable compile-time type checking of variable arity parameter types
Page:
DCL59-J. Do not apply public final to constants whose value might change in later releases
Page:
DCL60-J. Avoid cyclic dependencies between packages
Page:
ERR51-J. Prefer user-defined exceptions over more general exception types
Page:
ERR53-J. Try to gracefully recover from system errors
Page:
FIO51-J. Identify files using multiple file attributes
Page:
IDS50-J. Use conservative file naming conventions
Page:
MET54-J. Always provide feedback about the resulting value of a method
Page:
MSC50-J. Minimize the scope of the @SuppressWarnings annotation
Page:
MSC53-J. Carefully design interfaces before releasing them
Page:
NUM52-J. Be aware of numeric promotion behavior
Page:
OBJ51-J. Minimize the accessibility of classes and their members
Page:
OBJ52-J. Write garbage-collection-friendly code
section
Overview
Content Tools
{"serverDuration": 114, "requestCorrelationId": "b4747cc631748d99"}