Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6390976

jhat: JavaValueArray.toString() returns a string with extra quotes for char[]

XMLWordPrintable

    • b78
    • generic
    • generic

      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.

            sundar Sundararajan Athijegannathan
            sundar Sundararajan Athijegannathan
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: