Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.7.4
-
Component/s: JSON tree (JsonNode)
-
Labels:None
-
Testcase included:yes
-
Number of attachments :
Description
TextNode.getValueAsLong() is not properly parsing long values from nodes. For example, with JSON such as the following:
{ "id" : "127353264013893" }node.getValueAsLong() returns 0. However, if you pass a default value to the node, such as node.getValueAsLong(-1), then it correctly returns 127353264013893.
See attached testCase for demonstration.
Fixed – was a cut'n paste problem, calling integer parsing code.