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

Unified Diff: pkg/analyzer/lib/source/analysis_options_provider.dart

Issue 1933763002: Use null-aware operators to clean up the code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Additional clean-up Created 4 years, 8 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 | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/lib/source/path_filter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/source/analysis_options_provider.dart
diff --git a/pkg/analyzer/lib/source/analysis_options_provider.dart b/pkg/analyzer/lib/source/analysis_options_provider.dart
index 600dffcbbbc89c1b167dab0769a1ef99c6302318..3b6e33075634fb692c890f5a729414570971bd48 100644
--- a/pkg/analyzer/lib/source/analysis_options_provider.dart
+++ b/pkg/analyzer/lib/source/analysis_options_provider.dart
@@ -73,7 +73,7 @@ class AnalysisOptionsProvider {
throw new OptionsFormatException(
'Bad options file format (expected String scope key, '
'got ${k.runtimeType})',
- k != null ? k.span : doc.span);
+ (k ?? doc).span);
}
if (v != null && v is! YamlNode) {
throw new OptionsFormatException(
« no previous file with comments | « pkg/analyzer/lib/file_system/memory_file_system.dart ('k') | pkg/analyzer/lib/source/path_filter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698