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

Unified Diff: samples/total/client/SYLKReader.dart

Issue 10540114: Issue 3528. Additional checks for 'case expressions' (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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: samples/total/client/SYLKReader.dart
diff --git a/samples/total/client/SYLKReader.dart b/samples/total/client/SYLKReader.dart
index 92a286a5a510e289632aaff65abe6159f1e00dd9..14cc8923abb3a9b24768c3cab187b9b0206c31c0 100644
--- a/samples/total/client/SYLKReader.dart
+++ b/samples/total/client/SYLKReader.dart
@@ -103,14 +103,10 @@ class SYLKReader extends Reader {
}
String text;
- switch (true) {
- case req.status == 200 && req.responseText != null :
- text = req.responseText;
- break;
-
- default:
- text = 'ID;P';
- break;
+ if (req.status == 200 && req.responseText != null) {
+ text = req.responseText;
+ } else {
+ text = 'ID;P';
}
try {

Powered by Google App Engine
This is Rietveld 408576698