When getting String value of JavaValueArray for char[] instances, there are extra quotes at the end. If "Person" is a class with "name" field of type String. In the program from which heap was dumped, there is an instance of Person with name value "David".
Then the following OQL query
select p.name.value.toString() from Person p where p.name.value.toString().equals("David")
returns no matches. But, the following OQL query does:
select p.name.value.toString() from HeapObject p where p.name.value.toString().equals("\"David\"")
The extra quotes are needed for matching.
Then the following OQL query
select p.name.value.toString() from Person p where p.name.value.toString().equals("David")
returns no matches. But, the following OQL query does:
select p.name.value.toString() from HeapObject p where p.name.value.toString().equals("\"David\"")
The extra quotes are needed for matching.