Lucas Weitzendorf created OAK-12486:
---------------------------------------

             Summary: Deprecate oak-commons Buffer and replace internal uses 
with ByteBuffer
                 Key: OAK-12486
                 URL: https://issues.apache.org/jira/browse/OAK-12486
             Project: Jackrabbit Oak
          Issue Type: Improvement
          Components: segment-tar
            Reporter: Lucas Weitzendorf


org.apache.jackrabbit.oak.commons.Buffer is a thin wrapper around 
java.nio.ByteBuffer exposing a restricted subset of its API. Since Oak now 
targets Java 11, the wrapper adds little value and prevents callers from using 
more efficient/concise ByteBuffer methods (e.g. absolute bulk get/put, 
slice(int,int), mismatch).

Proposal:
* Deprecate org.apache.jackrabbit.oak.commons.Buffer.
* Replace its internal uses with java.nio.ByteBuffer in oak-segment-tar, 
oak-segment-remote, oak-segment-aws, oak-segment-azure and oak-upgrade.
* Keep the public segment persistence SPI (SegmentArchiveReader, 
SegmentArchiveWriter, PersistentCache) signatures unchanged for now to avoid a 
breaking change; convert at the boundary.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to