jetty / jetty/jetty.project

Cleanup `RetainableByteBuffer` vs `RetainableByteBuffer.Mutable` usages

Open
#14,866 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement
Dominant language
Java
Stars
4.1k
Forks
2k
Avg merge
3d 56m
Merged PRs (30d)
48

Description

**Jetty version(s)**
13.0.x
subtask of #14865

**Enhancement Description**
Since `RetainableByteBuffer.Mutable` extends from `RetainableByteBuffer`, there are very many places where the `RetainableByteBuffer` type is used while `RetainableByteBuffer.Mutable` should have been used as the place in code is about adding data to the buffer.

This should be fully cleaned up to help replacing them with the new `ReadableBuffer`/`WritableBuffer` as the latter need explicit flipping before they can be used to read or write.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating RetainableByteBuffer usages throughout the Jetty 13.0.x codebase and identify places that add data to the buffer. Replace those type usages with RetainableByteBuffer.Mutable where appropriate, and verify that all relevant usages are cleaned up in preparation for the ReadableBuffer/WritableBuffer replacement described in issue #14865.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.