Commit e151a1a4 authored by Alexandre Ardhuin's avatar Alexandre Ardhuin Committed by Adam Barth

prefer_contains (#8040)

parent 60f5cbba
...@@ -125,9 +125,9 @@ Future<String> getDartVersion() async { ...@@ -125,9 +125,9 @@ Future<String> getDartVersion() async {
// Dart VM version: 1.17.0-dev.2.0 (Tue May 3 12:14:52 2016) on "macos_x64" // Dart VM version: 1.17.0-dev.2.0 (Tue May 3 12:14:52 2016) on "macos_x64"
// to: // to:
// 1.17.0-dev.2.0 // 1.17.0-dev.2.0
if (version.indexOf('(') != -1) if (version.contains('('))
version = version.substring(0, version.indexOf('(')).trim(); version = version.substring(0, version.indexOf('(')).trim();
if (version.indexOf(':') != -1) if (version.contains(':'))
version = version.substring(version.indexOf(':') + 1).trim(); version = version.substring(version.indexOf(':') + 1).trim();
return version.replaceAll('"', "'"); return version.replaceAll('"', "'");
......
...@@ -127,7 +127,7 @@ class Daemon { ...@@ -127,7 +127,7 @@ class Daemon {
try { try {
String method = request['method']; String method = request['method'];
if (method.indexOf('.') == -1) if (!method.contains('.'))
throw 'method not understood: $method'; throw 'method not understood: $method';
String prefix = method.substring(0, method.indexOf('.')); String prefix = method.substring(0, method.indexOf('.'));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment