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

Unified Diff: pkg/analyzer/lib/source/embedder.dart

Issue 2321263003: Remove parseUriWithException() and URISyntaxException. (Closed)
Patch Set: Created 4 years, 3 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
Index: pkg/analyzer/lib/source/embedder.dart
diff --git a/pkg/analyzer/lib/source/embedder.dart b/pkg/analyzer/lib/source/embedder.dart
index ffcbfed592f6aaff656a66ba4482dfd068c9c4d9..5d63abcb87db523a1d4dc8d68236978cee26d8e4 100644
--- a/pkg/analyzer/lib/source/embedder.dart
+++ b/pkg/analyzer/lib/source/embedder.dart
@@ -11,7 +11,6 @@ import 'dart:core' hide Resource;
import 'package:analyzer/file_system/file_system.dart';
import 'package:analyzer/source/package_map_provider.dart'
show PackageMapProvider;
-import 'package:analyzer/src/generated/java_core.dart';
import 'package:analyzer/src/generated/java_io.dart' show JavaFile;
import 'package:analyzer/src/generated/sdk.dart';
import 'package:analyzer/src/generated/sdk_io.dart';
@@ -88,8 +87,8 @@ class EmbedderSdk extends AbstractDartSdk {
String filePath = srcPath.replaceAll('/', JavaFile.separator);
try {
JavaFile file = new JavaFile(filePath);
- return new FileBasedSource(file, parseUriWithException(dartUri));
- } on URISyntaxException {
+ return new FileBasedSource(file, Uri.parse(dartUri));
+ } on FormatException {
return null;
}
}

Powered by Google App Engine
This is Rietveld 408576698