fix a warning when compiling with Java 8 javac