DESCRIPTION

JCBC-505: Fix concurrency issue in Query builder.

Motivation
----------
Similar to one fix earler in SPY (SPY-170), only the regex matcher is thread safe
resetting it is not, leading to NPEs further down the stack.

Modifications
-------------
Always use a new builder and not reset the old one.

Result
------
Thread safety for the Query class and no exceptions like:

java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Matcher.java:1283)
at java.util.regex.Matcher.reset(Matcher.java:309)
at java.util.regex.Matcher.reset(Matcher.java:329)
at com.couchbase.client.protocol.views.Query.quote(Query.java:572)
at com.couchbase.client.protocol.views.Query.setRangeStart(Query.java:400)
at com.couchbase.client.protocol.views.Paginator.fetchNextPage(Paginator.java:180)
at com.couchbase.client.protocol.views.Paginator.hasNext(Paginator.java:160)

Change-Id: Icc578a03bdece1ebc9b344ee8fdbe36a2542b6cf


COMMENTS

author: Natasha Sullivan
date: 2014-07-30 16:51:23.852000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2014-08-04 05:25:48.740000000

Patch Set 1: Verified+1

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