DESCRIPTION

JCBC-582: Bucket details loading fails if bucket > 2gb

Motivation:

DefaultAsyncClusterManager.getBuckets() fails with
a ClassCastException if a bucket quota exceeds
2048 mega bytes. In addition the returned value
does not represent the correct quota size.

Modifications:

The JSON response from the Couchbase server returns
the quota as bytes not mega bytes in a long value.
As soon as the quota is greater than the max integer
the quota cannot be cast into the target variable.

So we divide the returned value by 1024² to get the
correct quota size in mega bytes and cast this to
an integer value.

Result:

Fixes the ClassCastException and the quota size.

Change-Id: Ib26e0341a3bc779e27bcdf9fd82001ecec742eb6

COMMENTS

author: Korbin Nash
date: 2014-10-13 13:59:42.220000000

Patch Set 2: Commit message was updated

-------------------------------------
author: Jasmin Rangel
date: 2014-10-13 13:59:42.701000000

Patch Set 2:

New patchset patch-id matches previous patchset, but commit message has changed.

-------------------------------------
author: Natasha Sullivan
date: 2014-10-13 14:01:09.748000000

Patch Set 2: Code-Review+2

-------------------------------------
author: Natasha Sullivan
date: 2014-10-13 14:04:05.025000000

Patch Set 2: Verified+1

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