Details
-
Improvement
-
Resolution: Fixed
-
Minor
-
3.0.0-alpha.7
-
None
-
None
-
1
Description
Calling bucket.defaultCollection().exists("someKey") with a key that doesn't exists throws an exception KeyNotFoundException.
This behavior feels a little bit awkward as I have to encapsulate the code with a try-catch, which totally defuse the purpose of the "exist" method. I this case I can simply go ahead and use the get method directly.
From my point of view, the exists method should return an object|boolean saying if the document has been found or not instead of throwing an exception.
Attachments
For Gerrit Dashboard: JCBC-1440 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
114542,3 | JCBC-1440: Exists should not throw key not found | master | couchbase-jvm-clients | Status: MERGED | +2 | +1 |