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

Unified Diff: pkg/analyzer/lib/src/dart/analysis/file_state.dart

Issue 2665393002: Small tweaks for AnalysisDriver and FileState. (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/dart/analysis/file_state.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/file_state.dart b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
index 4b8e514f2e010b65fa1c53b904a4dca7c5379f2a..50ed70a9cb603d8fa7dfc6ac59aab5e010a5325e 100644
--- a/pkg/analyzer/lib/src/dart/analysis/file_state.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/file_state.dart
@@ -194,7 +194,7 @@ class FileState {
* Return `true` if the file does not have a `library` directive, and has a
* `part of` directive, so is probably a part.
*/
- bool get isPart => _unlinked.libraryNameOffset == 0 && _unlinked.isPartOf;
+ bool get isPart => _unlinked.libraryNameOffset == 0 && _unlinked.isPartOf;
/**
* If the file [isPart], return a currently know library the file is a part
@@ -493,12 +493,7 @@ class FileState {
* cannot be parsed, cannot correspond any file, etc.
*/
FileState _fileForRelativeUri(String relativeUri) {
- Uri absoluteUri;
- try {
- absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri));
- } on FormatException catch (e) {
- return null;
- }
+ Uri absoluteUri = resolveRelativeUri(uri, Uri.parse(relativeUri));
return _fsState.getFileForUri(absoluteUri);
}
« no previous file with comments | « pkg/analyzer/lib/src/dart/analysis/driver.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698