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

Unified Diff: pkg/analysis_server/lib/src/services/correction/util.dart

Issue 1281313002: Fix regression in import fixups introduced by .packages support. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Cleaner fix Created 5 years, 4 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/analysis_server/lib/src/services/correction/util.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/util.dart b/pkg/analysis_server/lib/src/services/correction/util.dart
index c4082fa4765f599d1158f5dad493042ce6abf6ff..1af70b001146adf4e6552c3be9d54faef1ab1715 100644
--- a/pkg/analysis_server/lib/src/services/correction/util.dart
+++ b/pkg/analysis_server/lib/src/services/correction/util.dart
@@ -104,10 +104,11 @@ Expression climbPropertyAccess(AstNode node) {
*
* Returns the absolute (non-file) URI or `null`.
*/
-String findAbsoluteUri(AnalysisContext context, String path) {
- Source fileSource = new NonExistingSource(path, null, UriKind.FILE_URI);
+String findNonFileUri(AnalysisContext context, String path) {
+ Source fileSource =
+ new NonExistingSource(path, toUri(path), UriKind.FILE_URI);
Uri uri = context.sourceFactory.restoreUri(fileSource);
- if (uri == null) {
+ if (uri == null || uri.scheme == 'file') {
return null;
}
return uri.toString();

Powered by Google App Engine
This is Rietveld 408576698