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

Unified Diff: pkg/analysis_server/lib/src/analysis_server.dart

Issue 1113063007: Fix exception in stack trace from issue 23348 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added test Created 5 years, 8 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 | pkg/analysis_server/test/analysis_server_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/lib/src/analysis_server.dart
diff --git a/pkg/analysis_server/lib/src/analysis_server.dart b/pkg/analysis_server/lib/src/analysis_server.dart
index d468ce5bc5a394dbda24fda0db1486f516a63065..485d3a2f0a1238835392cbb335f57bf6276d25f1 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -443,7 +443,10 @@ class AnalysisServer {
}
// try to find the deep-most containing context
Resource resource = resourceProvider.getResource(path);
- File file = resource is File ? resource : null;
+ if (resource is! File) {
+ return null;
scheglov 2015/05/04 15:38:54 This breaks this method's contract. 1. It promise
Brian Wilkerson 2015/05/04 15:55:58 I misread the comment. Done.
+ }
+ File file = resource;
{
AnalysisContext containingContext = getContainingContext(path);
if (containingContext != null) {
« no previous file with comments | « no previous file | pkg/analysis_server/test/analysis_server_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698