Fix compilation on JDK8

Importing java.util.* leads to ambiguity under JDK8, due to the addition of java.util.Optional.