elharo opened a new issue, #85:
URL: https://github.com/apache/maven-shared-io/issues/85

   ## Bug #3
   
   `DefaultDownloadManager.java` lines 57, 79, 148
   
   The `cache` field (line 57) is a plain `HashMap` accessed in the 
non-synchronized `download()` method: `cache.get(url)` at line 79 and 
`cache.put(url, downloaded)` at line 148. If multiple threads call `download()` 
concurrently, `HashMap` can corrupt its internal structure, causing infinite 
loops, lost entries, or `NullPointerException`.
   
   Replace with `ConcurrentHashMap` or synchronize access.


-- 
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]

Reply via email to