remove Java8 code