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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library context.directory.manager; 5 library context.directory.manager;
6 6
7 import 'dart:async'; 7 import 'dart:async';
8 import 'dart:collection'; 8 import 'dart:collection';
9 import 'dart:convert'; 9 import 'dart:convert';
10 import 'dart:core'; 10 import 'dart:core';
(...skipping 687 matching lines...) Expand 10 before | Expand all | Expand 10 after
698 info.context.analysisOptions = analysisOptions; 698 info.context.analysisOptions = analysisOptions;
699 699
700 // Nothing more to do. 700 // Nothing more to do.
701 if (options == null) { 701 if (options == null) {
702 return; 702 return;
703 } 703 }
704 704
705 var analyzer = options[AnalyzerOptions.analyzer]; 705 var analyzer = options[AnalyzerOptions.analyzer];
706 if (analyzer is Map) { 706 if (analyzer is Map) {
707 // Set ignore patterns. 707 // Set ignore patterns.
708 YamlList exclude = analyzer[AnalyzerOptions.exclude]; 708 var exclude = analyzer[AnalyzerOptions.exclude];
709 List<String> excludeList = toStringList(exclude); 709 if (exclude is YamlList) {
710 if (excludeList != null) { 710 List<String> excludeList = toStringList(exclude);
711 setIgnorePatternsForContext(info, excludeList); 711 if (excludeList != null) {
712 setIgnorePatternsForContext(info, excludeList);
713 }
712 } 714 }
713 } 715 }
714 } 716 }
715 717
716 /** 718 /**
717 * Process [options] for the given context [info]. 719 * Process [options] for the given context [info].
718 */ 720 */
719 void processOptionsForDriver(ContextInfo info, 721 void processOptionsForDriver(ContextInfo info,
720 AnalysisOptionsImpl analysisOptions, Map<String, Object> options) { 722 AnalysisOptionsImpl analysisOptions, Map<String, Object> options) {
721 if (options == null) { 723 if (options == null) {
(...skipping 1217 matching lines...) Expand 10 before | Expand all | Expand 10 after
1939 } 1941 }
1940 return _embedderLocator; 1942 return _embedderLocator;
1941 } 1943 }
1942 1944
1943 @override 1945 @override
1944 SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) { 1946 SdkExtensionFinder getSdkExtensionFinder(ResourceProvider resourceProvider) {
1945 return _sdkExtensionFinder ??= 1947 return _sdkExtensionFinder ??=
1946 new SdkExtensionFinder(buildPackageMap(resourceProvider)); 1948 new SdkExtensionFinder(buildPackageMap(resourceProvider));
1947 } 1949 }
1948 } 1950 }
OLDNEW
« 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