I try to use DI with a final variable, the variable was already set to null so its value can not be set again - but it seams that the DI does a little bit more - see the code snippet below .
I run this code with Glassfish and it works well. Is this (final field reassign ) a container specific behavior or this is a standard DI behavior.
Originally posted by Mihai Radulescu: I try to use DI with a final variable
I run this code with Glassfish and it works well. Is this (final field reassign ) a container specific behavior or this is a standard DI behavior.
This looks like a bug to me. I had read in the spec that the fields which need dependency injection cannot be final. I don't seem to find that section in the spec right now.