by Paweł Chudzik

Final fields


Private final field modification is possible and it doesn’t require a lot of work. Since you should not use this mechanism in real life there are cases when it is useful. For example this how is Hibernate using this to hydrate final entity fields.

But when using final fields with Hibernate you should be extra careful how you declare them.

3 Dec 2016