You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to remove an event listener registered via TS3ApiAsync.addTS3Listeners and getting UnsupportedOperationException.
Stacktrace:
java.lang.UnsupportedOperationException: null
at java.util.concurrent.CopyOnWriteArrayList$COWIterator.remove(CopyOnWriteArrayList.java:1178)
at com.github.theholywaffle.teamspeak3.EventManager.removeListeners(EventManager.java:72)
at com.github.theholywaffle.teamspeak3.TS3ApiAsync.removeTS3Listeners(TS3ApiAsync.java:4146)
at org.kys.cerberus.clients.TeamspeakClient$JoinListener.$anonfun$onClientJoin$3(TeamspeakClient.scala:71)
at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:654)
at scala.util.Success.$anonfun$map$1(Try.scala:251)
at scala.util.Success.map(Try.scala:209)
at scala.concurrent.Future.$anonfun$map$1(Future.scala:288)
at scala.concurrent.impl.Promise.liftedTree1$1(Promise.scala:29)
at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:29)
at scala.concurrent.impl.CallbackRunnable.run$$$capture(Promise.scala:60)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala)
at java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1402)
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289)
at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056)
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692)
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157)
Hello,
I'm trying to remove an event listener registered via
TS3ApiAsync.addTS3Listeners
and gettingUnsupportedOperationException
.Stacktrace:
I've done cursory search and it seems like the
tasks
array is backed by Java'sCopyOnWriteArrayList
. The iterator inCopyOnWriteArrayList
does not implement.remove
, and so the exception is thrown.Javadoc: https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CopyOnWriteArrayList.html#iterator--
The text was updated successfully, but these errors were encountered: