Rename NullHandle to ScopedNullHandle
This makes it clearer that is invalid to do things like:
Handle<T> h = ScopedNullHandle<T>();
Bug: 26233305
Change-Id: I6d8f54eae01ec2e901cb7043afa853ea77db79fe
diff --git a/runtime/dex_file.cc b/runtime/dex_file.cc
index 880d3e0..bc8ba97 100644
--- a/runtime/dex_file.cc
+++ b/runtime/dex_file.cc
@@ -1383,8 +1383,11 @@
if (annotation_item == nullptr) {
return nullptr;
}
- mirror::Object* obj = GetAnnotationValue(
- klass, annotation_item, "value", NullHandle<mirror::Class>(), kDexAnnotationType);
+ mirror::Object* obj = GetAnnotationValue(klass,
+ annotation_item,
+ "value",
+ ScopedNullHandle<mirror::Class>(),
+ kDexAnnotationType);
if (obj == nullptr) {
return nullptr;
}
@@ -1410,8 +1413,11 @@
return nullptr;
}
AnnotationValue annotation_value;
- if (!ProcessAnnotationValue(
- klass, &annotation, &annotation_value, NullHandle<mirror::Class>(), kAllRaw)) {
+ if (!ProcessAnnotationValue(klass,
+ &annotation,
+ &annotation_value,
+ ScopedNullHandle<mirror::Class>(),
+ kAllRaw)) {
return nullptr;
}
if (annotation_value.type_ != kDexAnnotationMethod) {
@@ -1439,7 +1445,7 @@
return nullptr;
}
return GetAnnotationValue(
- klass, annotation_item, "value", NullHandle<mirror::Class>(), kDexAnnotationMethod);
+ klass, annotation_item, "value", ScopedNullHandle<mirror::Class>(), kDexAnnotationMethod);
}
bool DexFile::GetInnerClass(Handle<mirror::Class> klass, mirror::String** name) const {
@@ -1457,8 +1463,11 @@
return false;
}
AnnotationValue annotation_value;
- if (!ProcessAnnotationValue(
- klass, &annotation, &annotation_value, NullHandle<mirror::Class>(), kAllObjects)) {
+ if (!ProcessAnnotationValue(klass,
+ &annotation,
+ &annotation_value,
+ ScopedNullHandle<mirror::Class>(),
+ kAllObjects)) {
return false;
}
if (annotation_value.type_ != kDexAnnotationNull &&
@@ -1484,8 +1493,11 @@
return false;
}
AnnotationValue annotation_value;
- if (!ProcessAnnotationValue(
- klass, &annotation, &annotation_value, NullHandle<mirror::Class>(), kAllRaw)) {
+ if (!ProcessAnnotationValue(klass,
+ &annotation,
+ &annotation_value,
+ ScopedNullHandle<mirror::Class>(),
+ kAllRaw)) {
return false;
}
if (annotation_value.type_ != kDexAnnotationInt) {