KonradJanica commented on a change in pull request #16910:
URL: https://github.com/apache/beam/pull/16910#discussion_r812409398



##########
File path: playground/frontend/lib/modules/sdk/components/sdk_selector.dart
##########
@@ -67,15 +67,7 @@ class SDKSelector extends StatelessWidget {
                     onSelect: () {
                       close();
                       setSdk(value);
-                      setExample(
-                        state.defaultExamplesMap![value] ??
-                            ExampleModel(
-                              name: kEmptyExampleName,
-                              path: '',
-                              description: '',
-                              type: ExampleType.example,
-                            ),
-                      );
+                      setExample(state.defaultExamplesMap![value]!);

Review comment:
       These exclamation marks are a code smell. Can they be fixed by added 
asserts or default initializing?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to