Java 8 forEach conflict resolved