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 — fix: catch only expected IO failures by efegokdemir · Pull Request #2207 · apache/maven-resolver

Conversation

@efegokdemir

@efegokdemir efegokdemir commented Oct 12, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Fixes #1988.

PutTaskRequestContent.read() and rewind() now convert only IOException into terminal content failures. Unexpected runtime exceptions propagate to the caller instead of being hidden as ordinary content failures. Regression tests cover both channel paths.

Tests: focused Maven reactor verification passed with JDK 21; 105 Jetty tests passed and 10 were skipped. Spotless check passed with JDK 21.

  • I hereby declare this contribution to be licensed under the Apache License Version 2.0, January 2004
  • I hereby declare that I have filed an Apache Individual Contributor License Agreement.

Sorry, something went wrong.

Uh oh!

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

All reactions
@efegokdemir
fix: catch only expected IO failures
bed0809
gnodet-bot
gnodet-bot suggested changes Oct 12, 2026
View reviewed changes

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Review

REQUEST_CHANGES

The catch (Exception e) → catch (IOException e) narrowing in read() is the right fix: unexpected RuntimeExceptions should propagate to the caller rather than being silently swallowed as content failures.

However, the same narrowing applied to rewind() exposes a pre-existing control-flow bug that this PR leaves unaddressed:

After the catch block on line 298, execution falls through to return true at line 302 regardless of whether the catch was taken. So when an IOException is caught and lockedSetTerminal(...) marks the stream as terminally failed, the method still returns true — telling Jetty's retry logic that the rewind succeeded. The subsequent retry then reads from a broken, terminated channel instead of bailing out.

The fix: add return false; inside the catch block, or restructure so the method returns false on any failure path.


License checkbox: The Apache License declaration checkbox is unchecked in the PR description. Please tick it before merge.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread ...-transport-jetty/src/main/java/org/eclipse/aether/transport/jetty/PutTaskRequestContent.java Resolved

Uh oh!

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

@efegokdemir
fix: report failed Jetty rewinds
ecaecd6
gnodet-bot
gnodet-bot approved these changes Oct 12, 2026
View reviewed changes

@gnodet-bot gnodet-bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Re-review after latest commits. Both prior findings are addressed:

  • The rewind() fall-through return true bug is fixed — return false is now correctly placed inside the catch block, preventing a false success signal when an exception occurs.
  • Exception narrowing from Exception to IOException in both read() and rewind() is appropriate and correct.

⚠️ Reminder: The Apache License checkbox in the PR description is still unchecked — please tick it before merge.

This review was generated by an AI agent, Hermès on behalf of @gnodet.

Sorry, something went wrong.

Uh oh!

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

All reactions
@cstamas cstamas added this to the 2.0.25 milestone Oct 20, 2026
@cstamas cstamas added the bug Something isn't working label Oct 20, 2026
cstamas
cstamas approved these changes Oct 20, 2026
View reviewed changes
@cstamas
cstamas merged commit bf02fa2 into apache:master Oct 20, 2026
14 of 20 checks passed

Uh oh!

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

@github-actions github-actions Bot assigned cstamas Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@cstamas cstamas cstamas approved these changes
+1 more reviewer
@gnodet-bot gnodet-bot gnodet-bot approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

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

Assignees

@cstamas cstamas

Labels

bug Something isn't working

Projects

None yet

Milestone

2.0.25

Development

Successfully merging this pull request may close these issues.

Catching Throwable in non-framework code in PutTaskRequestContent

Uh oh!

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

3 participants

@efegokdemir @cstamas @gnodet-bot
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.