The diamond operator in java 7 allows code like the following:
List list = new LinkedList<>();
However in Java 5/6, I c
This line causes the [unchecked] warning:
List list = new LinkedList();
So, the question transforms: why [unchecked] warning is not suppressed automatically only for the case when new collection is created?
I think, it would be much more difficult task then adding <>
feature.
UPD: I also think that there would be a mess if it were legally to use raw types 'just for a few things'.