DESCRIPTION

JCBC-XXX: RetryBuilder - last error should not be caught.

Motivation
----------
The RetryBuilder (and subsequently the RetryWhenFunction)
fails to propagate the source exception when its exactly
the last retry attempt.

Modifications
-------------
This changeset fixes this edge case by first checking if
the given exception is part of the list to accept and if
not it propagates it right away before first checking
if the number of attempts is over.

Result
------
If a different exception is raised at the last retry
attempt, it is now propagated directly and not turned
into a composite CannotRetryException.

Change-Id: I4956c6a5fa59e5a8f06088379656d54d3bdf26ab


COMMENTS

author: Natasha Sullivan
date: 2017-10-29 09:14:29.014000000

Uploaded patch set 1.

-------------------------------------
author: Hugo Blankenship
date: 2017-10-29 09:14:37.821000000

Patch Set 1:

Build Started http://sdkbuilds.sc.couchbase.com/job/couchbase-java-client-test/225/

-------------------------------------
author: Hugo Blankenship
date: 2017-10-29 09:16:26.201000000

Patch Set 1: Verified+1

Build Successful 

http://sdkbuilds.sc.couchbase.com/job/couchbase-java-client-test/225/ : SUCCESS

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