Uploaded image for project: 'HTrace'
  1. HTrace
  2. HTRACE-40

MilliSpanDeserializer throws NumberFormatException when Span has negative Long value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.1.0
    • None
    • None

    Description

      When a negative long (e.g. -1L) is converted to hex string (ffff ffff ffff ffff), Long.parseLong treats it as a positive number that overflows, and the function throws NumberFormatException.
      The fix is to use java.math.BigInteger to parse it.

      Attachments

        1. HTRACE-40.001.patch
          4 kB
          Long Zhou

        Activity

          People

            longzhouwk Long Zhou
            longzhouwk Long Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: