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

Unified Diff: pkg/analysis_server/lib/src/services/completion/dart/utilities.dart

Issue 2844323004: Fix null default value access (#29512). (Closed)
Patch Set: Created 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
diff --git a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
index 314cbf4bfa76bf1f17f4ae5b0caaf16a1f1b521c..bd4421d4a59342e33507e58304d00bd886ccb992 100644
--- a/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
+++ b/pkg/analysis_server/lib/src/services/completion/dart/utilities.dart
@@ -76,7 +76,7 @@ void addDefaultArgDetails(
if (isFlutterWidget(element.enclosingElement)) {
for (ParameterElement param in element.parameters) {
if (param.name == 'children') {
- String defaultValue = getDefaultStringParameterValue(param);
+ String defaultValue = getDefaultStringParameterValue(param) ?? '';
Brian Wilkerson 2017/04/28 18:20:26 Or just fix `getDefaultStringParameterValue` to ne
pquitslund 2017/04/28 18:24:25 We use `null` as a sentinel elsewhere (in arglist_
if (sb.isNotEmpty) {
sb.write(', ');
}
« 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