Skip to content

fix #84: guard against null wagonManager and null getWagon() - #99

Merged
elharo merged 3 commits into
apache:masterfrom
elharo:fix-84-wagonmanager-npe
Aug 5, 2026
Merged

fix #84: guard against null wagonManager and null getWagon()#99
elharo merged 3 commits into
apache:masterfrom
elharo:fix-84-wagonmanager-npe

Conversation

@elharo

@elharo elharo commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Check wagonManager for null at start of download() and check wagon for null after getWagon() to prevent NPEs.

Fixes #84

elharo added 2 commits July 5, 2026 11:29
- Check wagonManager for null at start of download()
- Check wagon for null after getWagon()
- Add tests for both NPE scenarios
@elharo
elharo marked this pull request as ready for review July 5, 2026 12:06

@Test
void shouldFailToDownloadWhenWagonManagerIsNull() {
DefaultDownloadManager mgr = new DefaultDownloadManager();

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

mgr --> downloadManager

@elharo
elharo requested a review from kwin July 5, 2026 12:08
@elharo
elharo merged commit 16e0cce into apache:master Aug 5, 2026
17 checks passed
@elharo
elharo deleted the fix-84-wagonmanager-npe branch August 5, 2026 11:40
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown

@elharo Please assign appropriate label to PR according to the type of change.

@github-actions github-actions Bot added this to the 3.1.0 milestone Aug 5, 2026
@elharo elharo added the bug Something isn't working label Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DefaultDownloadManager: NPEs from uninitialized wagonManager and null getWagon()

2 participants