8172530: JShell: TypeProjection .stream().map(...).collect(...) must be replaced with .map(...)
authorrfield
Wed, 11 Jan 2017 11:09:04 -0800
changeset 43140 1e40241dc2d4
parent 43139 1d768b91ae4b
child 43141 7ea6578a9110
8172530: JShell: TypeProjection .stream().map(...).collect(...) must be replaced with .map(...) Reviewed-by: mcimadamore
langtools/src/jdk.jshell/share/classes/jdk/jshell/VarTypePrinter.java
--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarTypePrinter.java	Wed Jan 11 10:29:24 2017 -0800
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/VarTypePrinter.java	Wed Jan 11 11:09:04 2017 -0800
@@ -181,9 +181,7 @@
                 Type outer = t.getEnclosingType();
                 Type outer1 = visit(outer, upward);
                 List<Type> typarams = t.getTypeArguments();
-                List<Type> typarams1 = typarams.stream()
-                        .map(ta -> mapTypeArgument(ta, upward))
-                        .collect(List.collector());
+                List<Type> typarams1 = typarams.map(ta -> mapTypeArgument(ta, upward));
                 if (typarams1.stream().anyMatch(ta -> ta.hasTag(BOT))) {
                     //not defined
                     return syms.botType;