Removing Java 7 API calls