Skip to content

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

Open
elharo wants to merge 3 commits into
apache:masterfrom
elharo:fix-84-wagonmanager-npe
Open

fix #84: guard against null wagonManager and null getWagon()#99
elharo wants to merge 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DefaultDownloadManager: NPEs from uninitialized wagonManager and null getWagon()

1 participant