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

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

Issue 16611004: Improve java2dart code style - relax 'don't reference variable name in its initializer'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 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_io.dart
diff --git a/pkg/analyzer_experimental/lib/src/generated/source_io.dart b/pkg/analyzer_experimental/lib/src/generated/source_io.dart
index e473fc9cc92ac9c7fa185679398647b89b786cce..98d8fc0a3a016edd226de0a098a842ed9d0e36be 100644
--- a/pkg/analyzer_experimental/lib/src/generated/source_io.dart
+++ b/pkg/analyzer_experimental/lib/src/generated/source_io.dart
@@ -165,27 +165,27 @@ class PackageUriResolver extends UriResolver {
if (!isPackageUri(uri)) {
return null;
}
- String path2 = uri.path;
- if (path2 == null) {
- path2 = uri.path;
- if (path2 == null) {
+ String path = uri.path;
+ if (path == null) {
+ path = uri.path;
+ if (path == null) {
return null;
}
}
String pkgName;
String relPath;
- int index = path2.indexOf('/');
+ int index = path.indexOf('/');
if (index == -1) {
- pkgName = path2;
+ pkgName = path;
relPath = "";
} else if (index == 0) {
return null;
} else {
- pkgName = path2.substring(0, index);
- relPath = path2.substring(index + 1);
+ pkgName = path.substring(0, index);
+ relPath = path.substring(index + 1);
}
for (JavaFile packagesDirectory in _packagesDirectories) {
- JavaFile resolvedFile = new JavaFile.relative(packagesDirectory, path2);
+ JavaFile resolvedFile = new JavaFile.relative(packagesDirectory, path);
if (resolvedFile.exists()) {
return new FileBasedSource.con2(contentCache, getCanonicalFile(packagesDirectory, pkgName, relPath), UriKind.PACKAGE_URI);
}
« no previous file with comments | « pkg/analyzer_experimental/lib/src/generated/sdk_io.dart ('k') | pkg/analyzer_experimental/test/generated/ast_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698