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

Unified Diff: pkg/analyzer/lib/src/context/context.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/src/context/cache.dart ('k') | pkg/analyzer/lib/src/context/source.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/context/context.dart
diff --git a/pkg/analyzer/lib/src/context/context.dart b/pkg/analyzer/lib/src/context/context.dart
index 7815864b88b325362543b8c4c5c2c1609dd299c3..dbe6abfaf914eafa2deacbc5c8a2528f89e12276 100644
--- a/pkg/analyzer/lib/src/context/context.dart
+++ b/pkg/analyzer/lib/src/context/context.dart
@@ -843,10 +843,8 @@ class AnalysisContextImpl implements InternalAnalysisContext {
}
@override
- InternalAnalysisContext getContextFor(Source source) {
- InternalAnalysisContext context = _cache.getContextFor(source);
- return context == null ? this : context;
- }
+ InternalAnalysisContext getContextFor(Source source) =>
+ _cache.getContextFor(source) ?? this;
@override
Element getElement(ElementLocation location) {
« no previous file with comments | « pkg/analyzer/lib/src/context/cache.dart ('k') | pkg/analyzer/lib/src/context/source.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698