DESCRIPTION

JVMCBC-131: fix query response section detection

Motivation
----------
Current detection involves checking if next colon is before opening of
brackets. But if there's no next colon at all, nextColon becomes -1, and
this is always considered to be before the opening bracket.
This in turn triggers a state change, which fails because no actual
section header is anywhere to be found.

This can happen in large chunked responses where a chunk contains only
empty rows, for example SELECT toto FROM `beer-sample` (because toto is
not an existing field, the server returns as many empty rows {} as there
are documents in the bucket).

Modifications
-------------
Parser now checks if the colon is really there. Extracted the code into
a dedicated method "isEmptySection".

Result
------
Parser correctly parses large responses with empty row values.

Change-Id: I545ead76aa3143f7b449f8a82ae4ebbbaa068732
Reviewed-on: http://review.couchbase.org/45665
Reviewed-by: Natasha Sullivan xxx@xxx.xxx
Tested-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Estrella Humphrey
date: 2015-01-21 16:53:12.160000000

Change has been successfully cherry-picked as 5bbc70b68c411c15cb9aed7eb53c108b59e64862

-------------------------------------
