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

Unified Diff: pkg/analyzer_experimental/lib/src/generated/source.dart

Issue 16019002: Merge the dart:uri library into dart:core and update the Uri class (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Final cleanup Created 7 years, 7 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_experimental/lib/src/generated/source.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/source.dart b/pkg/analyzer_experimental/lib/src/generated/source.dart
index 83c24d02c6a40fd6ff2681447ccda48e2c603822..1be6594e197eeeb3cebcce2421d004515a5e0895 100644
--- a/pkg/analyzer_experimental/lib/src/generated/source.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/source.dart
@@ -3,7 +3,6 @@
library engine.source;
-import 'dart:uri';
import 'java_core.dart';
import 'sdk.dart' show DartSdk;
import 'engine.dart' show AnalysisContext;
@@ -55,7 +54,7 @@ class SourceFactory {
*/
Source forUri(String absoluteUri) {
try {
- Uri uri = new Uri(absoluteUri);
+ Uri uri = Uri.parse(absoluteUri);
if (uri.isAbsolute) {
return resolveUri2(null, uri);
}
@@ -79,7 +78,7 @@ class SourceFactory {
throw new IllegalArgumentException("Invalid source kind in encoding: ${kind}");
}
try {
- Uri uri = new Uri(encoding.substring(1));
+ Uri uri = Uri.parse(encoding.substring(1));
for (UriResolver resolver in _resolvers) {
Source result = resolver.fromEncoding(_contentCache, kind, uri);
if (result != null) {
@@ -126,7 +125,7 @@ class SourceFactory {
*/
Source resolveUri(Source containingSource, String containedUri) {
try {
- return resolveUri2(containingSource, new Uri(containedUri));
+ return resolveUri2(containingSource, Uri.parse(containedUri));
} on URISyntaxException catch (exception) {
return null;
}
@@ -729,4 +728,4 @@ class ContentCache {
_stampMap[source] = JavaSystem.currentTimeMillis();
}
}
-}
+}
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/sdk_io.dart ('k') | pkg/analyzer_experimental/lib/src/generated/source_io.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698