[
https://issues.apache.org/jira/browse/OAK-12486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rishabh Daim resolved OAK-12486.
--------------------------------
Fix Version/s: 2.10.0
Resolution: Fixed
> 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
> Assignee: Nuno Santos
> Priority: Major
> Fix For: 2.10.0
>
>
> org.apache.jackrabbit.oak.commons.Buffer wraps java.nio.ByteBuffer to avoid
> NoSuchMethodError when code compiled on Java 9+ ran on Java 8. Oak now
> requires Java 17, so that reason no longer applies.
> Meanwhile the wrapper exposes only a restricted subset of the ByteBuffer API,
> which is tedious to keep up to date and prevents callers from using more
> efficient/concise methods (e.g. absolute bulk get/put, slice(int,int)).
> Proposal:
> * Deprecate org.apache.jackrabbit.oak.commons.Buffer (no other change to
> oak-commons).
> * Replace all its uses with java.nio.ByteBuffer in oak-segment-tar,
> oak-segment-remote, oak-segment-aws, oak-segment-azure and oak-upgrade,
> including the segment persistence SPI (SegmentArchiveReader,
> SegmentArchiveWriter, PersistentCache) and the oak-segment-remote hooks.
> * The affected exported packages are all @Internal
> (segment.remote.persistentcache via OAK-12510), so they get major version
> bumps without a deprecation period.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)