Index: pkg/analysis_server/lib/src/services/index/indexable_element.dart |
diff --git a/pkg/analysis_server/lib/src/services/index/indexable_element.dart b/pkg/analysis_server/lib/src/services/index/indexable_element.dart |
index ce41dd9639dc9261b8a0b7013d97a53f27816907..c0a30e7bdb22990bfced242356be83e20b8d6cbc 100644 |
--- a/pkg/analysis_server/lib/src/services/index/indexable_element.dart |
+++ b/pkg/analysis_server/lib/src/services/index/indexable_element.dart |
@@ -23,7 +23,11 @@ class IndexableElement implements IndexableObject { |
/** |
* Initialize a newly created wrapper to wrap the given [element]. |
*/ |
- IndexableElement(this.element); |
+ IndexableElement(this.element) { |
+ if (element == null) { |
+ throw new ArgumentError.notNull('element'); |
+ } |
+ } |
@override |
int get hashCode => element.hashCode; |
@@ -152,7 +156,7 @@ class IndexableElementKind implements IndexableObjectKind { |
() => new IndexableElementKind._(ElementKind.CONSTRUCTOR)); |
} |
ElementKind elementKind = element.kind; |
- return _kindMap.putIfAbsent(elementKind, () => |
- new IndexableElementKind._(elementKind)); |
+ return _kindMap.putIfAbsent( |
+ elementKind, () => new IndexableElementKind._(elementKind)); |
} |
} |