Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(318)

Unified Diff: pkg/analysis_server/lib/src/context_manager.dart

Issue 2697603005: Check the type of a map entry before using it (issue 28756) (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c8faf136a6c2544c1419e540ba633c7dd3e72f3c..d564850c8b2c1ef8cc80a70f95115f24f70e9b3d 100644
--- a/pkg/analysis_server/lib/src/context_manager.dart
+++ b/pkg/analysis_server/lib/src/context_manager.dart
@@ -705,10 +705,12 @@ class ContextManagerImpl implements ContextManager {
var analyzer = options[AnalyzerOptions.analyzer];
if (analyzer is Map) {
// Set ignore patterns.
- YamlList exclude = analyzer[AnalyzerOptions.exclude];
- List<String> excludeList = toStringList(exclude);
- if (excludeList != null) {
- setIgnorePatternsForContext(info, excludeList);
+ var exclude = analyzer[AnalyzerOptions.exclude];
+ if (exclude is YamlList) {
+ List<String> excludeList = toStringList(exclude);
+ if (excludeList != null) {
+ setIgnorePatternsForContext(info, excludeList);
+ }
}
}
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698