Skip to content

Conversation

@kwin
Copy link
Member

@kwin kwin commented Jan 13, 2026

This affects both Server used for Tests and Jetty Transport (for HTTP) This increases Java requirements to 17 for Jetty Transport

Following this checklist to help us incorporate your
contribution quickly and easily:

  • Your pull request should address just one issue, without pulling in other changes.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Each commit in the pull request should have a meaningful subject line and body.
    Note that commits might be squashed by a maintainer on merge.
  • Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied.
    This may not always be possible but is a best-practice.
  • Run mvn verify to make sure basic checks pass.
    A more thorough check will be performed on your pull request automatically.
  • You have run the integration tests successfully (mvn -Prun-its verify).

If your pull request is about ~20 lines of code you don't need to sign an
Individual Contributor License Agreement if you are unsure
please ask on the developers list.

To make clear that you license your contribution under
the Apache License Version 2.0, January 2004
you have to acknowledge this by using the following check-box.

This affects both Server used for Tests and Jetty Transport (for HTTP)
This increases Java requirements to 17 for Jetty Transport
@kwin kwin requested a review from cstamas January 13, 2026 18:17
if (putTask.getDataPath() != null) {
channel = Files.newByteChannel(putTask.getDataPath(), StandardOpenOption.READ);
} else {
// TODO: support rewind for retries when using InputStream
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cstamas Any idea how to implement that with minimal effort?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public InputStream newInputStream() throws IOException {
if (dataPath != null) {
return Files.newInputStream(dataPath);
}
return new ByteArrayInputStream(dataBytes);
}

PutTask carries either a file (File in Resolver 1 or Path in Resolver 2) or handful of bytes (as byte[]). Also is a final class, so maybe we just need to expose this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Came up with a simpler solution based on Supplier<ReadableByteChannel> in 82f6bda.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement tracked in #1751

@kwin kwin marked this pull request as ready for review January 13, 2026 19:18
@kwin kwin merged commit bca6186 into master Jan 16, 2026
20 checks passed
@kwin kwin deleted the feature/jetty-12.1 branch January 16, 2026 19:21
@github-actions
Copy link

@kwin Please assign appropriate label to PR according to the type of change.

@github-actions github-actions bot added this to the 2.0.15 milestone Jan 16, 2026
@kwin kwin added enhancement New feature or request dependencies Pull requests that update a dependency file labels Jan 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants