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

jhat: sum OQL built-in function is broken

XMLWordPrintable

    • b63
    • generic
    • generic

      jhat's OQL (Object Query Language) supports sum built-in function. This function returns sum of elements of the input array/iterator or enumeration. This function optionally accepts a code expression (second param) that is used to map the input elements before summing those.

      For eg:

      select sum(heap.objects('java.util.Vector'), 'sizeof(it)')

      is supposed to print sum of sizes of all Vector instances.

      But, this prints a String that is concatenation of individual sizes.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: