Remove usage of Consumer<T> from jdk8 stdlib, because we want to support jdk7.