langtools/src/jdk.jshell/share/classes/jdk/jshell/SourceCodeAnalysisImpl.java
changeset 42828 cce89649f958
parent 42827 36468b5fa7f4
child 42836 1d55dcc9a118
--- 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();