...
Although final
is most often safe for creating compile time immutable constants, its use has a few caveats when dealing with composite objects (mutable data in particular). See guideline OBJ01-J. Be aware Do not assume that declaring a final reference may refer to _mutable_ datareference to be final causes the referenced object to be immutable for more details.
Noncompliant Code Example
...