8150077: Due to a javac type inference issue, javadoc doesn't compile with a jdk prior to 8u40
authorsimonis
Wed, 17 Feb 2016 19:09:44 +0100
changeset 36043 0a4c7a4fde8d
parent 36042 885eb5258cc4
child 36044 8d48ff7e2cf2
8150077: Due to a javac type inference issue, javadoc doesn't compile with a jdk prior to 8u40 Reviewed-by: jjg
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/RootDocImpl.java
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Wed Feb 17 11:19:07 2016 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java	Wed Feb 17 19:09:44 2016 +0100
@@ -176,7 +176,7 @@
         List<Element> excludeList = members.stream()
                 .filter((member) -> (!isDeprecated(member)))
                 .sorted(makeGeneralPurposeComparator())
-                .collect(Collectors.toCollection(ArrayList::new));
+                .collect(Collectors.<Element, List<Element>>toCollection(ArrayList::new));
         return excludeList;
     }
 
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/RootDocImpl.java	Wed Feb 17 11:19:07 2016 -0800
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/RootDocImpl.java	Wed Feb 17 19:09:44 2016 +0100
@@ -272,7 +272,7 @@
     public List<Element> getSelectedElements(List<? extends Element> elements) {
         return elements.stream()
                 .filter(e -> isIncluded(e))
-                .collect(Collectors.toList());
+                .collect(Collectors.<Element>toList());
     }
 
     @Override