Chromium Code Reviews| Index: sdk/lib/core/uri.dart |
| diff --git a/sdk/lib/core/uri.dart b/sdk/lib/core/uri.dart |
| index 4b601a78a5cbd8556faf8cc7a3d38ef692d01451..eb17262421909c560c8c4cdf47f1f533bb54e36c 100644 |
| --- a/sdk/lib/core/uri.dart |
| +++ b/sdk/lib/core/uri.dart |
| @@ -1102,17 +1102,17 @@ class Uri { |
| */ |
| static String _makeScheme(String scheme, int end) { |
| if (end == 0) return ""; |
| - int char = scheme.codeUnitAt(0); |
| - if (!_isAlphabeticCharacter(char)) { |
| + final int firstCodeUnit = scheme.codeUnitAt(0); |
| + if (!_isAlphabeticCharacter(firstCodeUnit)) { |
| _fail(scheme, 0, "Scheme not starting with alphabetic character"); |
| } |
| - bool allLowercase = char >= _LOWER_CASE_A; |
| + bool allLowercase = firstCodeUnit >= _LOWER_CASE_A; |
| for (int i = 0; i < end; i++) { |
| - int codeUnit = scheme.codeUnitAt(i); |
| + final int codeUnit = scheme.codeUnitAt(i); |
| if (!_isSchemeCharacter(codeUnit)) { |
| _fail(scheme, i, "Illegal scheme character"); |
| } |
| - if (_LOWER_CASE_A <= char && _LOWER_CASE_Z >= char) { |
|
Lasse Reichstein Nielsen
2014/09/04 05:57:14
whoops.
Anders Johnsen
2014/09/04 06:27:57
Heh, copy paste :)
|
| + if (codeUnit < _LOWER_CASE_A || codeUnit > _LOWER_CASE_Z) { |
| allLowercase = false; |
| } |
| } |