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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to