elharo opened a new issue, #84: URL: https://github.com/apache/maven-shared-io/issues/84
## Bugs #1 and #2 (related) Both in `DefaultDownloadManager.java`: ### 1. NPE from no-arg constructor leaving `wagonManager` null `DefaultDownloadManager.java` lines 55, 98, 134-135 The `wagonManager` field (line 55) is only set via the parameterized constructor (line 67-68). The no-arg constructor (line 62) leaves it `null`, but `download()` dereferences it unconditionally at lines 98, 134, and 135, causing a `NullPointerException`. ### 2. NPE when `wagonManager.getWagon()` returns null `DefaultDownloadManager.java` lines 98, 121-122 `wagonManager.getWagon()` (line 98) may return `null` (the contract doesn't forbid it). The return value is never null-checked; lines 121-122 call `wagon.addTransferListener()` on it unconditionally, causing a `NullPointerException`. -- 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]
