migration to stream api: disable for raw types (IDEA-140095)

This commit is contained in:
Anna Kozlova
2015-05-08 21:01:45 +02:00
parent 9f1a944f75
commit 2f47f0caf0
2 changed files with 24 additions and 1 deletions
@@ -0,0 +1,22 @@
// "Replace with forEach" "false"
import java.util.*;
import java.util.stream.Collectors
class A {
public static <T> List<T> toTypedList1(Collection collection, Class<T> aClass) {
if (collection.size() == 0) {
return Collections.emptyList();
}
List<T> result = new ArrayList<>(collection.size());
for (Object obj : coll<caret>ection) {
result.add(aClass.cast(obj));
}
return result;
}
}