diff --git a/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt b/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt index c20ae4132b8..7bde8a216cf 100644 --- a/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt +++ b/pkg/dev_compiler/tool/dart2js_nnbd_sdk_error_golden.txt @@ -15,5 +15,4 @@ WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|1476|39|5|The left WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8384|60|5|The left operand can't be null, so the right operand is never executed. WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9311|54|5|The left operand can't be null, so the right operand is never executed. WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/developer/developer.dart|315|25|23|The left operand can't be null, so the right operand is never executed. -WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/html/dart2js/html_dart2js.dart|4076|25|2|The left operand can't be null, so the right operand is never executed. WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/io/io.dart|9167|16|1|The left operand can't be null, so the right operand is never executed. diff --git a/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt b/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt index ccf9e8ec1f9..3bce22d9020 100644 --- a/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt +++ b/pkg/dev_compiler/tool/dartdevc_nnbd_sdk_error_golden.txt @@ -20,5 +20,4 @@ WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|8384|60|5|The left WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/_http/http.dart|9311|54|5|The left operand can't be null, so the right operand is never executed. WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/collection/collection.dart|1076|46|13|The left operand can't be null, so the right operand is never executed. WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/developer/developer.dart|332|25|23|The left operand can't be null, so the right operand is never executed. -WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/html/dart2js/html_dart2js.dart|4076|25|2|The left operand can't be null, so the right operand is never executed. WARNING|STATIC_WARNING|DEAD_NULL_COALESCE|lib/io/io.dart|9167|16|1|The left operand can't be null, so the right operand is never executed. diff --git a/sdk/lib/html/dart2js/html_dart2js.dart b/sdk/lib/html/dart2js/html_dart2js.dart index e07517dae1a..da0e03f1c25 100644 --- a/sdk/lib/html/dart2js/html_dart2js.dart +++ b/sdk/lib/html/dart2js/html_dart2js.dart @@ -3685,8 +3685,7 @@ class CssStyleDeclaration extends Interceptor with CssStyleDeclarationBase { /// /// Please note the property name uses camelCase, not-hyphens. String getPropertyValue(String propertyName) { - var propValue = _getPropertyValueHelper(propertyName); - return propValue ?? ''; + return _getPropertyValueHelper(propertyName); } String _getPropertyValueHelper(String propertyName) { diff --git a/sdk_nnbd/lib/html/dart2js/html_dart2js.dart b/sdk_nnbd/lib/html/dart2js/html_dart2js.dart index a69ece661e5..5ace01aa3a6 100644 --- a/sdk_nnbd/lib/html/dart2js/html_dart2js.dart +++ b/sdk_nnbd/lib/html/dart2js/html_dart2js.dart @@ -4072,8 +4072,7 @@ class CssStyleDeclaration extends Interceptor with CssStyleDeclarationBase { /// /// Please note the property name uses camelCase, not-hyphens. String getPropertyValue(String propertyName) { - var propValue = _getPropertyValueHelper(propertyName); - return propValue ?? ''; + return _getPropertyValueHelper(propertyName); } String _getPropertyValueHelper(String propertyName) { diff --git a/tools/dom/scripts/css_code_generator.py b/tools/dom/scripts/css_code_generator.py index 9e71e694c25..8910ed1e919 100644 --- a/tools/dom/scripts/css_code_generator.py +++ b/tools/dom/scripts/css_code_generator.py @@ -125,8 +125,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with /// /// Please note the property name uses camelCase, not-hyphens. String getPropertyValue(String propertyName) { - var propValue = _getPropertyValueHelper(propertyName); - return propValue ?? ''; + return _getPropertyValueHelper(propertyName); } String _getPropertyValueHelper(String propertyName) { diff --git a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate index 6edac30e7f2..5359faa58a1 100644 --- a/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate +++ b/tools/dom/templates/html/impl/impl_CSSStyleDeclaration.darttemplate @@ -27,8 +27,7 @@ $(ANNOTATIONS)$(NATIVESPEC)$(CLASS_MODIFIERS)class $CLASSNAME $EXTENDS with /// /// Please note the property name uses camelCase, not-hyphens. String getPropertyValue(String propertyName) { - var propValue = _getPropertyValueHelper(propertyName); - return propValue ?? ''; + return _getPropertyValueHelper(propertyName); } String _getPropertyValueHelper(String propertyName) {