GeezerVison is showing github.com — Listener RuntimeException silently swallowed by default in ChainedRepositoryListener/ChainedTransferListener · Issue #1990 · apache/maven-resolver
Listener RuntimeException silently swallowed by default in ChainedRepositoryListener/ChainedTransferListener #1990
Description
Affected version: HEAD
Files:
maven-resolver-util/src/main/java/org/eclipse/aether/util/listener/ChainedRepositoryListener.java:117
maven-resolver-util/src/main/java/org/eclipse/aether/util/listener/ChainedTransferListener.java:118
@SuppressWarnings("EmptyMethod")
protected void handleError(...) {
// default just swallows errors
}
All RuntimeExceptions thrown by any chained listener (NPEs, IndexOutOfBoundsException, etc.) are silently swallowed unless the user subclasses and overrides handleError. This makes listener bugs invisible.
Originally reported in #1944.
Activity
slachiewicz commented on Sep 1, 2026
Analysis & Triage
- Problem Identified:
ChainedRepositoryListener and ChainedTransferListener have an empty default handleError() implementation, causing any RuntimeException (such as NullPointerException or IllegalArgumentException) thrown by custom listeners to be swallowed silently with no logging or notification.
- Affected Versions: Both 1.9.x and 2.0.x.
- Plan to Fix:
- Add a logger to
ChainedRepositoryListener and ChainedTransferListener to log listener exceptions at WARNING level by default.
- Add unit tests in
ChainedRepositoryListenerTest and ChainedTransferListenerTest verifying that exceptions in one listener do not prevent subsequent listeners in the multicast chain from receiving events. (Targeted for 2.0.24 in PR Fix listener error swallowing (#1990), SyncContext double-close (#1992), and test flakiness (#1350) #2108)
modified the milestone:
This milestone has been deleted on Sep 1, 2026
Metadata
Metadata
Development
No branches or pull requestsIssue actions