fix a java8 method issue