fix deprecated method call
make project compile on jdk8