You can always use a lambda expression:
return l.stream().collect(Collectors.toMap(a -> a.id, Function.identity()));
I think that "method references" are called this way for a reason, and therefore apply only for methods.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…