...
A related error can arise when a programmer declares a static final
reference to a mutable object; see VOID OBJ02-J. Never conflate immutability of a reference with that of the referenced object for additional information.
...
[JLS 2005] | |
| |
| |
|
...
DCL57-JG. Properly encode relationships in constant definitions 01. Declarations and Initialization (DCL) DCL05-J. Declare all enhanced for statement loop variables to be final