remove java8 only code