remove api from newer java