[java/cs] Handle empty switches