Skip to content

Catching Throwable in non-framework code in PutTaskRequestContent #1988

Description

@elharo

Affected version: HEAD

File: maven-resolver-transport-jetty/src/main/java/org/eclipse/aether/transport/jetty/PutTaskRequestContent.java:246, 298

} catch (Throwable t) {
    lockedSetTerminal(Content.Chunk.from(t, true));
}

Catches OutOfMemoryError, StackOverflowError, InternalError, etc. These should propagate. Wrapping them as terminal chunks converts fatal JVM errors into regular failure conditions, making them invisible to diagnostics.

Originally reported in #1944.

Activity

  1. modified the milestones: 2.1.0, on Sep 1, 2026
  2. elharo commented on Sep 26, 2026

    @elharo
    ContributorAuthor

    The fix is incomplete. The code still catches a raw Exception, which is better than Throwable but not what it likely should be doing (unless some method call in its scope is itself broken and declared to throw a raw Exception). This needs to be scoped to what is expected and handled.

  3. reopened this on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions