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

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

Issue 2664543002: Complete with null, not return null as a Future. (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 | « no previous file | 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/driver.dart
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 5e71f2059acb6ab96b1360f8e716807ff3a062b0..203944d3dfb316293a6d36d0e063abb0cbde939a 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -505,7 +505,7 @@ class AnalysisDriver {
*/
Future<AnalysisDriverUnitIndex> getIndex(String path) {
if (!_fsState.hasUri(path)) {
- return null;
+ return new Future.value();
}
var completer = new Completer<AnalysisDriverUnitIndex>();
_indexRequestedFiles
@@ -535,7 +535,7 @@ class AnalysisDriver {
*/
Future<AnalysisResult> getResult(String path) {
if (!_fsState.hasUri(path)) {
- return null;
+ return new Future.value();
}
// Return the cached result.
@@ -575,7 +575,7 @@ class AnalysisDriver {
*/
Future<CompilationUnitElement> getUnitElement(String path) {
if (!_fsState.hasUri(path)) {
- return null;
+ return new Future.value();
}
var completer = new Completer<CompilationUnitElement>();
_unitElementRequestedFiles
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698