import static java.util.stream.Collectors.toMap; import java.util.Collection; import java.util.function.Function; abstract class CollectionConsumer { protected CollectionConsumer(Collection col) { col.stream().collect(toMap(T::getId, Function.identity())); // crashes javac (1.8.0_51-b16), compiles fine with eclipse compiler // and javac (1.9.0-ea-b72) col.stream().collect(toMap(AbstractClass::getId, Function.identity())); // compiles fine with both javac (all versions) and // eclipse compiler } }