ART: Rename Handle hierarchy
Bring the names in line with normal OO principles: ConstHandle
becomes Handle, and Handle becomes MutableHandle.
Change-Id: I0f018eb7ba28bc422e3a23dd73a6cbe6fc2d2044
diff --git a/runtime/proxy_test.cc b/runtime/proxy_test.cc
index d977ce9..1eded62 100644
--- a/runtime/proxy_test.cc
+++ b/runtime/proxy_test.cc
@@ -183,7 +183,8 @@
ASSERT_TRUE(throwsFieldClass.Get() != nullptr);
// Test "Class[] interfaces" field.
- FieldHelper fh(hs.NewHandle(static_fields->Get(0)));
+ MutableHandle<mirror::ArtField> fhandle = hs.NewHandle(static_fields->Get(0));
+ FieldHelper fh(fhandle);
EXPECT_EQ("interfaces", std::string(fh.GetField()->GetName()));
EXPECT_EQ("[Ljava/lang/Class;", std::string(fh.GetField()->GetTypeDescriptor()));
EXPECT_EQ(interfacesFieldClass.Get(), fh.GetType());
@@ -191,12 +192,13 @@
EXPECT_FALSE(fh.GetField()->IsPrimitiveType());
// Test "Class[][] throws" field.
- fh.ChangeField(static_fields->Get(1));
- EXPECT_EQ("throws", std::string(fh.GetField()->GetName()));
- EXPECT_EQ("[[Ljava/lang/Class;", std::string(fh.GetField()->GetTypeDescriptor()));
- EXPECT_EQ(throwsFieldClass.Get(), fh.GetType());
- EXPECT_EQ("L$Proxy1234;", std::string(fh.GetDeclaringClassDescriptor()));
- EXPECT_FALSE(fh.GetField()->IsPrimitiveType());
+ fhandle.Assign(static_fields->Get(1));
+ FieldHelper fh2(fhandle);
+ EXPECT_EQ("throws", std::string(fh2.GetField()->GetName()));
+ EXPECT_EQ("[[Ljava/lang/Class;", std::string(fh2.GetField()->GetTypeDescriptor()));
+ EXPECT_EQ(throwsFieldClass.Get(), fh2.GetType());
+ EXPECT_EQ("L$Proxy1234;", std::string(fh2.GetDeclaringClassDescriptor()));
+ EXPECT_FALSE(fh2.GetField()->IsPrimitiveType());
}
} // namespace art