Closed aarushbhutra closed 1 year ago
Hello, thanks for the PR. I looked into the problem myself and your solution would probably solve it but I found a better solution.
The issue was in synchronization, there were multiple threads accessing the same HashSet
, resulting in the ConcurrentModificationException
. I decided to use ConcurrentHashMap.newKeySet()
, instead of the normal HashSet, because this one is actually thread-safe by design.
Anyhow, thanks for the PR, but it won't be necessary, I will now close this.
This pull request addresses issue #127 by fixing the ConcurrentModificationException in the HologramManager class. The problem was caused by attempting to modify a collection while iterating through it in the hideAll method. To resolve the issue, I modified the hideAll method by creating a copy of the hologram collection and the temporaryLines set. Then, I iterated through the copies to safely hide the holograms and lines without modifying the original collections.