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

Unified Diff: lib/uri/uri.dart

Issue 11225025: [json & uri] cleanup === and !== (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | « lib/json/json.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/uri/uri.dart
===================================================================
--- lib/uri/uri.dart (revision 13856)
+++ lib/uri/uri.dart (working copy)
@@ -48,7 +48,7 @@
static String _emptyIfNull(String val) => val != null ? val : '';
static int _parseIntOrZero(String val) {
- if (val !== null && val != '') {
+ if (val != null && val != '') {
return int.parse(val);
} else {
return 0;
@@ -217,13 +217,13 @@
if (hasAuthority() || (scheme == "file")) {
sb.add("//");
_addIfNonEmpty(sb, userInfo, userInfo, "@");
- sb.add(domain === null ? "null" : domain);
+ sb.add(domain == null ? "null" : domain);
if (port != 0) {
sb.add(":");
sb.add(port.toString());
}
}
- sb.add(path === null ? "null" : path);
+ sb.add(path == null ? "null" : path);
_addIfNonEmpty(sb, query, "?", query);
_addIfNonEmpty(sb, fragment, "#", fragment);
return sb.toString();
@@ -232,8 +232,8 @@
static void _addIfNonEmpty(StringBuffer sb, String test,
String first, String second) {
if ("" != test) {
- sb.add(first === null ? "null" : first);
- sb.add(second === null ? "null" : second);
+ sb.add(first == null ? "null" : first);
+ sb.add(second == null ? "null" : second);
}
}
}
« no previous file with comments | « lib/json/json.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698