Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.1
-
Fix Version/s: 1.3.2
-
Labels:None
-
Testcase included:yes
-
Patch Submitted:Yes
-
Number of attachments :
Description
Let's take following JSON like string as an example. It is not valid BadgerFish JSON so we should get an error while processing it.
"{ \"alice\":
{ \"foo\" : \"bob\" }}"
This generates now events
START_ELEMENT alice
START_ELEMENT alice
END_ELEMENT
END_DOCUMENT
If you have somewhere loop like
while ( reader.next() != END_ELEMENT )
you have potential infinite loop since start and end element events do not match. We fixed this by throwing an exception if the JSON object type is not what it is supposed to be according to Badgerfish format.
Patch and test attached.