Chapter 7. Methods (MET)
Rules
Risk Assessment Summary
MET00-J. Validate method arguments
Validate method arguments to ensure that they fall within the bounds of the method’s intended design. This practice ensures that operations on the method’s parameters yield valid results. Failure to validate method arguments can result in incorrect calculations, runtime exceptions, violation of class invariants, and inconsistent object state.
Redundant testing of arguments by both the caller and the callee is a style of defensive programming that is largely ...
Get The CERT® Oracle® Secure Coding Standard for Java™ now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.