remove the code which depends on java 1.7