GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Auto-port 5.0: Handle non-positive skip lengths in ByteBufInputStream by netty-project-bot · Pull Request #17409 · netty/netty

Conversation

@netty-project-bot

@netty-project-bot netty-project-bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Auto-port of #17388 to 5.0
Cherry-picked commit: 87eb426


Motivation:

ByteBufInputStream currently delegates non-positive skip values to ByteBuf.skipBytes(). This means negative values result in an IllegalArgumentException.

While subclasses of InputStream may handle negative values differently, InputStream's default implementation returns 0 without skipping any bytes. Making ByteBufInputStream behave the same way provides more consistent
stream behavior.

Modification:

Return 0 immediately from ByteBufInputStream.skip(long) and skipBytes(int) when the requested length is non-positive.

Result:

ByteBufInputStream now handles non-positive skip lengths consistently with InputStream's default behavior.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cuishuang @netty-project-bot
Handle non-positive skip lengths in ByteBufInputStream (#17388)
edafd72
Motivation:

ByteBufInputStream currently delegates non-positive skip values to
ByteBuf.skipBytes(). This means negative values result in an
IllegalArgumentException.

While subclasses of InputStream may handle negative values differently,
InputStream's default implementation returns 0 without skipping any
bytes. Making ByteBufInputStream behave the same way provides more
consistent
stream behavior.

Modification:

Return 0 immediately from ByteBufInputStream.skip(long) and
skipBytes(int) when the requested length is non-positive.

Result:

ByteBufInputStream now handles non-positive skip lengths consistently
with InputStream's default behavior.

(cherry picked from commit 87eb426)
@netty-project-bot netty-project-bot mentioned this pull request Sep 10, 2026
Handle non-positive skip lengths in ByteBufInputStream #17388
Merged
@testlens-app

testlens-app Bot commented Sep 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

✅ All tests passed ✅

⚠️ TestLens detected flakiness ⚠️

Test Summary

Build PR / windows-x86_64-java25-boringssl > Netty/Buffer

Test Runs Flakiness
AlignedPooledByteBufAllocatorTest > testThreadCacheDestroyedByThreadCleaner() ⚠️ 0% 🟢

🏷️ Commit: edafd72
▶️ Tests: 193702 executed
⚪️ Checks: 12/12 completed

Test Failures

AlignedPooledByteBufAllocatorTest > testThreadCacheDestroyedByThreadCleaner() (Netty/Buffer in Build PR / windows-x86_64-java25-boringssl)
java.util.concurrent.TimeoutException: testThreadCacheDestroyedByThreadCleaner() timed out after 20 seconds
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:511)
	at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1450)
	at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:2019)
	at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:187)
Caused by: org.junit.jupiter.api.AssertTimeoutPreemptively$ExecutionTimeoutException: Execution timed out in thread junit-timeout-thread-1
	at java.base/java.lang.Object.wait0(Native Method)
	at java.base/java.lang.Object.wait(Object.java:389)
	at java.base/java.lang.Thread.join(Thread.java:1887)
	at java.base/java.lang.Thread.join(Thread.java:1963)
	at io.netty.buffer.PooledByteBufAllocatorTest.testThreadCacheDestroyed(PooledByteBufAllocatorTest.java:416)
	at io.netty.buffer.PooledByteBufAllocatorTest.testThreadCacheDestroyedByThreadCleaner(PooledByteBufAllocatorTest.java:366)
	at java.base/java.lang.reflect.Method.invoke(Method.java:565)
	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1090)
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:614)
	at java.base/java.lang.Thread.run(Thread.java:1474)

Learn more about TestLens at testlens.app/docs.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer
normanmaurer merged commit e49c7e3 into 5.0 Sep 10, 2026
12 of 13 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@normanmaurer normanmaurer added this to the 5.0.0.Final milestone Sep 10, 2026
@normanmaurer
normanmaurer deleted the auto-port-pr-17388-to-5.0 branch September 10, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

5.0.0.Final

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@netty-project-bot @normanmaurer @cuishuang
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.