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

Unified Diff: dart/utils/uri/uri.dart

Issue 9303033: Two different classes may have the same *name*. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: null.toString() is also broken Created 8 years, 11 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: dart/utils/uri/uri.dart
diff --git a/dart/utils/uri/uri.dart b/dart/utils/uri/uri.dart
index d06042142e76c27ef6e2c6b59f50c029e79b0178..239b80b7273113d191c759c0d5aedf959374d51d 100644
--- a/dart/utils/uri/uri.dart
+++ b/dart/utils/uri/uri.dart
@@ -169,13 +169,13 @@ class Uri {
if (hasAuthority() || (scheme == "file")) {
sb.add("//");
_addIfNonEmpty(sb, userInfo, userInfo, "@");
- sb.add(domain);
+ sb.add(domain === null ? "null" : domain);
if (port != 0) {
sb.add(":");
sb.add(port.toString());
}
}
- sb.add(path);
+ sb.add(path === null ? "null" : path);
_addIfNonEmpty(sb, query, "?", query);
_addIfNonEmpty(sb, fragment, "#", fragment);
return sb.toString();
@@ -184,8 +184,8 @@ class Uri {
static void _addIfNonEmpty(StringBuffer sb, String test,
String first, String second) {
if ("" != test) {
- sb.add(first);
- sb.add(second);
+ sb.add(first === null ? "null" : first);
+ sb.add(second === null ? "null" : second);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698