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

Unified Diff: pkg/analysis_server/lib/src/services/correction/namespace.dart

Issue 1941793002: Use null aware operators to clean up code (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: 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
Index: pkg/analysis_server/lib/src/services/correction/namespace.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/namespace.dart b/pkg/analysis_server/lib/src/services/correction/namespace.dart
index b0058aaffa95c3266fd9db67abaf28e3984431f8..0aa0b8d2695904bdc76aede877213c09253fcdb7 100644
--- a/pkg/analysis_server/lib/src/services/correction/namespace.dart
+++ b/pkg/analysis_server/lib/src/services/correction/namespace.dart
@@ -46,7 +46,7 @@ ImportElement getImportElement(SimpleIdentifier prefixNode) {
return importDirective.element;
}
ImportElementInfo info = internal_getImportElementInfo(prefixNode);
- return info != null ? info.element : null;
+ return info?.element;
}
/**

Powered by Google App Engine
This is Rietveld 408576698