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


COMMENTS

author: Natasha Sullivan
date: 2016-06-01 11:57:26.181000000

Uploaded patch set 1.

-------------------------------------
author: Natasha Sullivan
date: 2016-06-01 12:07:40.307000000

Patch Set 1: Verified+1

-------------------------------------
author: Estrella Humphrey
date: 2016-06-01 12:26:50.718000000

Patch Set 1: Code-Review+2

-------------------------------------
author: Gerrit Code Review
date: 2016-06-01 12:27:00.036000000

Change has been successfully cherry-picked as 26e278b1105464359611dfdac5a58368bd6e9385 by Natasha Sullivan

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