summaryrefslogtreecommitdiff
path: root/tools/ahat/test/ObjectHandlerTest.java
diff options
context:
space:
mode:
author Richard Uhler <ruhler@google.com> 2017-09-11 13:04:05 +0100
committer Richard Uhler <ruhler@google.com> 2017-09-13 12:48:59 +0100
commit8d02c895a872926fba8618ae30d5c855ef337fe7 (patch)
tree86d5e218e78cea29dc891ec1892d18be150402f4 /tools/ahat/test/ObjectHandlerTest.java
parent21f89d2cc47e9f688b0d7143a282b17a241a50a2 (diff)
Remove findClass and mClasses from AhatSnapshot.
The mClasses data structure mapping class names to class objects was only used for testing purposes. Remove this data structure from AhatSnapshot and find an alternative approach for the test cases so that users don't incur the runtime and memory costs of the data structure. Test: m ahat-test Change-Id: If7804f943c6155448a5fded92ff71e946435b584
Diffstat (limited to 'tools/ahat/test/ObjectHandlerTest.java')
-rw-r--r--tools/ahat/test/ObjectHandlerTest.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/ahat/test/ObjectHandlerTest.java b/tools/ahat/test/ObjectHandlerTest.java
index cd0ba23013..1b8a781e0c 100644
--- a/tools/ahat/test/ObjectHandlerTest.java
+++ b/tools/ahat/test/ObjectHandlerTest.java
@@ -42,7 +42,7 @@ public class ObjectHandlerTest {
AhatSnapshot snapshot = dump.getAhatSnapshot();
AhatHandler handler = new ObjectHandler(snapshot);
- AhatInstance object = snapshot.findClass("Main");
+ AhatInstance object = dump.findClass("Main");
assertNotNull(object);
TestHandler.testNoCrash(handler, "http://localhost:7100/object?id=" + object.getId());
@@ -55,7 +55,7 @@ public class ObjectHandlerTest {
AhatSnapshot snapshot = dump.getAhatSnapshot();
AhatHandler handler = new ObjectHandler(snapshot);
- AhatInstance object = snapshot.findClass("java.lang.String");
+ AhatInstance object = dump.findClass("java.lang.String");
assertNotNull(object);
TestHandler.testNoCrash(handler, "http://localhost:7100/object?id=" + object.getId());