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

Unified Diff: pkg/analysis_server/lib/src/services/correction/fix_internal.dart

Issue 1098423002: Issue 23271. Check target.staticElement for null. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | 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/services/correction/fix_internal.dart
diff --git a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
index d370589aad437702f6ca312663ca5c7d267e33a8..ba59146bd616f026892cd383e4cb38c59c58ff1b 100644
--- a/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
+++ b/pkg/analysis_server/lib/src/services/correction/fix_internal.dart
@@ -721,6 +721,9 @@ class FixProcessor {
if (target is Identifier) {
Identifier targetIdentifier = target;
Element targetElement = targetIdentifier.staticElement;
+ if (targetElement == null) {
+ return;
Brian Wilkerson 2015/04/22 20:55:55 Given that we don't expect this case, and think th
+ }
staticModifier = targetElement.kind == ElementKind.CLASS;
}
} else {
@@ -1186,7 +1189,6 @@ class FixProcessor {
if (name.startsWith('_')) {
return;
}
-
// may be there is an existing import,
// but it is with prefix and we don't use this prefix
for (ImportElement imp in unitLibraryElement.imports) {
« 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