You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@htrace.apache.org by "Long Zhou (JIRA)" <ji...@apache.org> on 2014/12/31 19:40:13 UTC

[jira] [Created] (HTRACE-40) MilliSpanDeserializer throws NumberFormatException when Span has negative Long value

Long Zhou created HTRACE-40:
-------------------------------

             Summary: MilliSpanDeserializer throws NumberFormatException when Span has negative Long value
                 Key: HTRACE-40
                 URL: https://issues.apache.org/jira/browse/HTRACE-40
             Project: HTrace
          Issue Type: Bug
            Reporter: Long Zhou
            Assignee: Long Zhou


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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)