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

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

Issue 1397403002: Return 'null' rename refactoring in case of a null element. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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/services/refactoring/rename_constructor_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/services/refactoring/refactoring.dart
diff --git a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
index acf741f1986f37e919fff67df1542cdd0d1cdcaa..a4d3c6b6a334daf1354de3ce8672994dbf3d78c3 100644
--- a/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
+++ b/pkg/analysis_server/lib/src/services/refactoring/refactoring.dart
@@ -356,6 +356,9 @@ abstract class RenameRefactoring implements Refactoring {
* type.
*/
factory RenameRefactoring(SearchEngine searchEngine, Element element) {
+ if (element == null) {
+ return null;
+ }
if (element is PropertyAccessorElement) {
element = (element as PropertyAccessorElement).variable;
}
« no previous file with comments | « no previous file | pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698