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

Unified Diff: sdk/lib/core/uri.dart

Issue 2245323004: Make Uri._makeQuery easier to analyze (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/uri.dart
diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart
index 456bcb7589769a20d1e84d41f915517caa11b7f0..813dc5bc89bff846a82146f0254c2de1308f56d8 100644
--- a/sdk/lib/core/uri.dart
+++ b/sdk/lib/core/uri.dart
@@ -1382,11 +1382,11 @@ class Uri {
static String _makeQuery(
String query, int start, int end,
Map<String, dynamic/*String|Iterable<String>*/> queryParameters) {
- if (query == null && queryParameters == null) return null;
if (query != null && queryParameters != null) {
throw new ArgumentError('Both query and queryParameters specified');
}
if (query != null) return _normalize(query, start, end, _queryCharTable);
Lasse Reichstein Nielsen 2016/08/17 10:53:12 I hate seeing `if (query != null` twice. How about
sra1 2016/08/17 17:41:35 Done.
+ if (queryParameters == null) return null;
var result = new StringBuffer();
var separator = "";
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698