fix java8 infinite recursion issue