8150077: Due to a javac type inference issue, javadoc doesn't compile with a jdk prior to 8u40
Reviewed-by: jjg
--- 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