Chromium Code Reviews| Index: pkg/analyzer/lib/src/summary/uri.dart |
| diff --git a/pkg/analyzer/lib/src/summary/uri.dart b/pkg/analyzer/lib/src/summary/uri.dart |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..11eca445b9a875ff0d7dd37935edd83c5d263166 |
| --- /dev/null |
| +++ b/pkg/analyzer/lib/src/summary/uri.dart |
| @@ -0,0 +1,15 @@ |
| +// Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file |
| +// for details. All rights reserved. Use of this source code is governed by a |
| +// BSD-style license that can be found in the LICENSE file. |
| + |
| +/** |
| + * Return `true` is the [uriStr] represents a syntactically correct URI. |
| + */ |
| +bool isValidUri(String uriStr) { |
|
Brian Wilkerson
2017/02/01 21:02:10
I can't see any uses of this function (probably ju
scheglov
2017/02/01 21:08:47
You're right, we don't use it.
I will remove the f
|
| + try { |
| + Uri.parse(uriStr); |
| + return true; |
| + } on FormatException { |
| + return false; |
| + } |
| +} |