deprecated setter injection
removed deprecated setter injection
added null check