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

Unified Diff: pkg/analysis_server/lib/plugin/protocol/protocol.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/plugin/protocol/protocol.dart
diff --git a/pkg/analysis_server/lib/plugin/protocol/protocol.dart b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
index 032e4f96b3e5b93ae70df088dbe53014993ecfa9..92ef921bc592a571466d8e094fe3314c111075c6 100644
--- a/pkg/analysis_server/lib/plugin/protocol/protocol.dart
+++ b/pkg/analysis_server/lib/plugin/protocol/protocol.dart
@@ -160,7 +160,7 @@ class Request {
*/
Request(this.id, this.method,
[Map<String, Object> params, this.clientRequestTime])
- : _params = params != null ? params : new HashMap<String, Object>();
+ : _params = params ?? new HashMap<String, Object>();
/**
* Return a request parsed from the given json, or `null` if the [data] is

Powered by Google App Engine
This is Rietveld 408576698