Return Inside Finally Block |
Weakness ID: 584 (Weakness Base) | Status: Draft |
Description Summary
Example 1
In the following code excerpt, the IllegalArgumentException will never be delivered to the caller. The finally block will cause the exception to be discarded.
Do not use a return statement inside the finally block. The finally block should have "cleanup" code. |
Nature | Type | ID | Name | View(s) this relationship pertains to |
---|---|---|---|---|
ChildOf | Category | 389 | Error Conditions, Return Values, Status Codes | Development Concepts (primary)699 |
ChildOf | Weakness Class | 705 | Incorrect Control Flow Scoping | Research Concepts (primary)1000 |
Security-Database help your corporation foresee and avoid any security risks that may impact your IT infrastructure and business applications.
28 June 2016