You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "efegokdemir (via GitHub)" <gi...@apache.org> on 2026/10/12 21:30:46 UTC
[PR] fix: catch only expected IO failures [maven-resolver]
efegokdemir opened a new pull request, #2207:
URL: https://github.com/apache/maven-resolver/pull/2207
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
- [x] I hereby declare that I have filed an Apache Individual Contributor License Agreement.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: catch only expected IO failures [maven-resolver]
Posted by "efegokdemir (via GitHub)" <gi...@apache.org>.
efegokdemir commented on code in PR #2207:
URL: https://github.com/apache/maven-resolver/pull/2207#discussion_r4252666436
##########
maven-resolver-transport-jetty/src/main/java/org/eclipse/aether/transport/jetty/PutTaskRequestContent.java:
##########
@@ -295,7 +295,7 @@ public boolean rewind() {
offsetRemaining = 0;
totalRead = 0;
return true;
- } catch (Exception e) {
+ } catch (IOException e) {
Review Comment:
Fixed in `ecaecd6`. `rewind()` now returns `false` when repositioning fails with an `IOException`, with a regression test for that path. The Maven reactor test run passed: 106 Jetty tests, 10 skipped. Spotless could not run here because its Palantir formatter is incompatible with the available Java 27 runtime.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: catch only expected IO failures [maven-resolver]
Posted by "cstamas (via GitHub)" <gi...@apache.org>.
cstamas merged PR #2207:
URL: https://github.com/apache/maven-resolver/pull/2207
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: catch only expected IO failures [maven-resolver]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #2207:
URL: https://github.com/apache/maven-resolver/pull/2207#discussion_r4252560968
##########
maven-resolver-transport-jetty/src/main/java/org/eclipse/aether/transport/jetty/PutTaskRequestContent.java:
##########
@@ -295,7 +295,7 @@ public boolean rewind() {
offsetRemaining = 0;
totalRead = 0;
return true;
- } catch (Exception e) {
+ } catch (IOException e) {
Review Comment:
⚠️ **Bug: fall-through `return true` after `IOException` catch**
This narrowing correctly exposes unexpected `RuntimeException`s, but the pre-existing fall-through bug at line 302 is now even more critical. After catching `IOException` and calling `lockedSetTerminal(...)`, execution falls through to `return true` — falsely signalling a successful rewind to Jetty's retry logic.
The fix:
```suggestion
} catch (IOException e) {
lockedSetTerminal(Content.Chunk.from(e, true));
return false;
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org