[java/cs] Fixed override overloaded generic functions that return Void. Closes #3171