Update to Java 8 and use [functor] only when necessary