| Index: samples/third_party/dromaeo/common/JSON.dart
|
| diff --git a/samples/third_party/dromaeo/common/JSON.dart b/samples/third_party/dromaeo/common/JSON.dart
|
| index f3d0624abce7f7ba88d43a6b10b2ccf3a669274e..483f2a3cd1a8b8c7324d5fd8cd456b5d24f59389 100644
|
| --- a/samples/third_party/dromaeo/common/JSON.dart
|
| +++ b/samples/third_party/dromaeo/common/JSON.dart
|
| @@ -344,14 +344,14 @@ class JsonParser {
|
| JsonToken token = _tokenizer.next();
|
| final result = _parseValue(token);
|
| token = _tokenizer.next();
|
| - if (token !== null) {
|
| + if (token != null) {
|
| throw 'Junk at the end';
|
| }
|
| return result;
|
| }
|
|
|
| _parseValue(final JsonToken token) {
|
| - if (token === null) {
|
| + if (token == null) {
|
| throw 'Nothing to parse';
|
| }
|
| switch (token.kind) {
|
| @@ -414,7 +414,7 @@ class JsonParser {
|
|
|
| void _parseSequence(int endTokenKind, void parseElement(JsonToken token)) {
|
| JsonToken token = _tokenizer.next();
|
| - if (token === null) {
|
| + if (token == null) {
|
| throw 'Unexpected end of stream';
|
| }
|
| if (token.kind == endTokenKind) {
|
| @@ -424,7 +424,7 @@ class JsonParser {
|
| parseElement(token);
|
|
|
| token = _tokenizer.next();
|
| - if (token === null) {
|
| + if (token == null) {
|
| throw 'Expected either comma or terminator';
|
| }
|
| while (token.kind != endTokenKind) {
|
| @@ -438,7 +438,7 @@ class JsonParser {
|
| }
|
|
|
| void _assertTokenKind(JsonToken token, int kind) {
|
| - if (token === null || token.kind != kind) {
|
| + if (token == null || token.kind != kind) {
|
| throw 'Unexpected token kind: token = ${token}, expected kind = ${kind}';
|
| }
|
| }
|
| @@ -506,7 +506,7 @@ class JsonStringifier {
|
| void _checkCycle(final object) {
|
| // TODO: use Iterables.
|
| for (int i = 0; i < _seen.length; i++) {
|
| - if (_seen[i] === object) {
|
| + if (identical(_seen[i], object)) {
|
| throw 'Cyclic structure';
|
| }
|
| }
|
| @@ -518,13 +518,13 @@ class JsonStringifier {
|
| // TODO: use writeOn.
|
| _sb.add(_numberToString(object));
|
| return;
|
| - } else if (object === true) {
|
| + } else if (identical(object, true)) {
|
| _sb.add('true');
|
| return;
|
| - } else if (object === false) {
|
| + } else if (identical(object, false)) {
|
| _sb.add('false');
|
| return;
|
| - } else if (object === null) {
|
| + } else if (object == null) {
|
| _sb.add('null');
|
| return;
|
| } else if (object is String) {
|
|
|