DESCRIPTION

JVMCBC-339: Send flush only to endpoints which are != null

Motivation
----------
Users reported cases where a NPE is raised under edge cases:

java.lang.NullPointerException
   at com.couchbase.client.core.service.AbstractDynamicService.send(AbstractDynamicService.java:124)
   at com.couchbase.client.core.node.CouchbaseNode.send(CouchbaseNode.java:189)
   at com.couchbase.client.core.RequestHandler.flush(RequestHandler.java:196)

Modifications
-------------
The code now explicitly checks for != null before the flush event is sent, since if no endpoint
is stored under the array element it doesn't make sense to flush it in the first place.

Result
------
No NPE under edge cases in flush.

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


COMMENTS

author: Natasha Sullivan
date: 2016-06-03 09:49:12.352000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2016-06-03 09:49:32.587000000

Patch Set 1: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2016-06-03 09:59:08.851000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2016-06-03 10:06:12.195000000

Change has been successfully cherry-picked as 2aeca3127288995329fd1b01cb32d40161444e93 by Natasha Sullivan

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