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

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

Issue 2755023002: Guard analysis server's getAnalysisResult, must be dart (Closed)
Patch Set: Guard analysis server's getAnalysisResult, must be dart Created 3 years, 9 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/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 ff6c0c95bac189f7d55e738455d8ff3bac4afedd..8fe0d1849b65ba0c7bab8b4a20c652f23e2457cb 100644
--- a/pkg/analysis_server/lib/src/analysis_server.dart
+++ b/pkg/analysis_server/lib/src/analysis_server.dart
@@ -662,6 +662,10 @@ class AnalysisServer {
* otherwise in the first driver, otherwise `null` is returned.
*/
Future<nd.AnalysisResult> getAnalysisResult(String path) async {
+ if (!AnalysisEngine.isDartFileName(path)) {
+ return null;
+ }
+
try {
nd.AnalysisDriver driver = getAnalysisDriver(path);
return await driver?.getResult(path);
« 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