Index: pkg/analysis_server/lib/src/context_manager.dart |
diff --git a/pkg/analysis_server/lib/src/context_manager.dart b/pkg/analysis_server/lib/src/context_manager.dart |
index 585da4628b77350130670db2dd01b158c96cf6a5..e77ae2261d71a7eda0720fd3c6c3cf49cfbd9d61 100644 |
--- a/pkg/analysis_server/lib/src/context_manager.dart |
+++ b/pkg/analysis_server/lib/src/context_manager.dart |
@@ -23,6 +23,7 @@ import 'package:analyzer/source/path_filter.dart'; |
import 'package:analyzer/source/pub_package_map_provider.dart'; |
import 'package:analyzer/source/sdk_ext.dart'; |
import 'package:analyzer/src/context/context.dart' as context; |
+import 'package:analyzer/src/context/context.dart'; |
import 'package:analyzer/src/context/source.dart'; |
import 'package:analyzer/src/generated/engine.dart'; |
import 'package:analyzer/src/generated/java_engine.dart'; |
@@ -625,7 +626,7 @@ class ContextManagerImpl implements ContextManager { |
if (analyzer is Map) { |
// Set ignore patterns. |
YamlList exclude = analyzer[AnalyzerOptions.exclude]; |
- List<String> excludeList = _toStringList(exclude); |
+ List<String> excludeList = toStringList(exclude); |
if (excludeList != null) { |
setIgnorePatternsForContext(info, excludeList); |
} |
@@ -1594,25 +1595,6 @@ class ContextManagerImpl implements ContextManager { |
} |
/** |
- * If all of the elements of [list] are strings, return a list of strings |
- * containing the same elements. Otherwise, return `null`. |
- */ |
- List<String> _toStringList(YamlList list) { |
- if (list == null) { |
- return null; |
- } |
- List<String> stringList = <String>[]; |
- for (var element in list) { |
- if (element is String) { |
- stringList.add(element); |
- } else { |
- return null; |
- } |
- } |
- return stringList; |
- } |
- |
- /** |
* If the given [object] is a map, and all of the keys in the map are strings, |
* return a map containing the same mappings. Otherwise, return `null`. |
*/ |