--- a/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java Fri Dec 16 15:27:34 2016 +0000
+++ b/langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java Fri Dec 16 15:27:47 2016 +0000
@@ -1119,7 +1119,7 @@
}
if (guessKind(code) == Kind.IMPORT)
- return Collections.<Documentation>emptyList();
+ return Collections.emptyList();
OuterWrap codeWrap = proc.outerMap.wrapInTrialClass(Wrap.methodWrap(code));
AnalyzeTask at = proc.taskFactory.new AnalyzeTask(codeWrap, keepParameterNames);
@@ -1128,7 +1128,7 @@
TreePath tp = pathFor(topLevel, sp, codeWrap.snippetIndexToWrapIndex(cursor));
if (tp == null)
- return Collections.<Documentation>emptyList();
+ return Collections.emptyList();
TreePath prevPath = null;
while (tp != null && tp.getLeaf().getKind() != Kind.METHOD_INVOCATION &&
@@ -1139,7 +1139,7 @@
}
if (tp == null)
- return Collections.<Documentation>emptyList();
+ return Collections.emptyList();
Stream<Element> elements;
Iterable<Pair<ExecutableElement, ExecutableType>> candidates;
@@ -1175,12 +1175,12 @@
el.asType().getKind() == TypeKind.ERROR ||
(el.getKind() == ElementKind.PACKAGE && el.getEnclosedElements().isEmpty())) {
//erroneous element:
- return Collections.<Documentation>emptyList();
+ return Collections.emptyList();
}
elements = Stream.of(el);
} else {
- return Collections.<Documentation>emptyList();
+ return Collections.emptyList();
}
List<Documentation> result = Collections.emptyList();