Details
-
Story
-
Resolution: Won't Do
-
Major
-
2.5.2
-
None
-
None
Description
Legacy application saved some binary data to couchbase via memcached protocol.
We can not change that application.
We need to read that data from Java.
We call
CouchbaseAsyncBucket.get(id, BinaryDocument.class) |
it finds BinaryTransformer to get our data.
BUT
BinaryTransformer insists on certain flags and so fails:
protected BinaryDocument doDecode(String id, ByteBuf content, long cas, int expiry, int flags, |
ResponseStatus status) throws Exception { |
if (!TranscoderUtils.hasBinaryFlags(flags)) { |
throw new TranscodingException("Flags (0x" + Integer.toHexString(flags) + ") indicate non-binary " + |
"document for id " + id + ", could not decode."); |
}
|
We worked around by registering our custom transcoder = we have workaround and are happy there.
BUT
we feel that if one wants binary document, and so states in .get(id, BinaryDocument.class) then they want binary data and do not actually need this additional check.
Please consider dropping it.