JDA-Applications / JDA-Utilities

A series of tools and utilities for JDA to assist in bot creation
Apache License 2.0
218 stars 111 forks source link

Concurrency with EventWaiter #57

Closed ThePrimedTNT closed 6 years ago

ThePrimedTNT commented 6 years ago

When using EventWaiter for my project I came across this error:

java.util.ConcurrentModificationException: null
    at java.util.HashMap$HashIterator.nextNode(HashMap.java:1442)
    at java.util.HashMap$KeyIterator.next(HashMap.java:1466)
    at java.util.AbstractCollection.toArray(AbstractCollection.java:196)
    at com.jagrosh.jdautilities.commons.waiter.EventWaiter.onEvent(EventWaiter.java:239)
Shengaero commented 6 years ago

Before I even discuss merging this PR, can you replicate the error consistently?

MinnDevelopment commented 6 years ago

Why not allow the library user to provide the map?

Shengaero commented 6 years ago

Because I don't find this PR an appropriate fix for the problem at hand, I am going to close it, and move it to a proper issue where it can be addressed in a proper way.

@MinnDevelopment is correct, we should allow the library user to provide a map, however this PR doesn't address this and puts very little effort in to fixing the problem.