public void testStringTableRoot() {
if (rootsCheckList == null) {
rootsCheckList = getRootsCheckList();
}
HeapRoot[] roots = searchRootByClassName(rootsCheckList, "", JavaReference.HEAP_ROOT_STRINGTABLE);
HeapRoot currentRoot = null;
JavaField countField = null;
JavaField valueField = null;
Iterator fields = javaLangString.getDeclaredFields().iterator();
while (fields.hasNext()) {
Object next = fields.next();
if (next instanceof JavaField) {
JavaField field = (JavaField) next;
try {
if (field.getName().equals("value")) {
valueField = field;
} else if (field.getName().equals("count")) {
countField = field;
}
} catch (CorruptDataException e) {
assertNotNull(e.getCorruptData());
}
}
}
boolean found = false;
for (int i=0; i<roots.length; i++) {
currentRoot = roots[i];
Object rootObject = currentRoot.getRoot();
if (!(rootObject instanceof JavaObject)) {
continue;
}
JavaObject root = (JavaObject)rootObject;