Replace lambda expression with anonymous inner class.