fixed scala/java mixed compilation issue.