Java MultiStreamWS example gets exception


#1

When I run the MultiStreamWS example from datasift-java I get a ConcurrentModificationException. This happens with the downloaded 2.2.0 version and 2.2.1 built from source. The MultiStream example does work.

Output:


Creating user…
Building hash list…
Getting the consumer…
Consuming…

Subscribing to “Python”, 89251290332bb42c0e6a647f8c3f6cb6…
Connected

Subscribing to “PHP”, b95a09322b49f59881565bd46487dd81…
Disconnected

Exception in thread “Thread-1” java.util.ConcurrentModificationException
at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
at java.util.ArrayList$Itr.next(ArrayList.java:791)
at org.datasift.streamconsumer.WSThread$1.onOpen(Unknown Source)
at org.datasift.dep.ws.WebSocketConnection.connect(Unknown Source)
at org.datasift.streamconsumer.WSThread.run(Unknown Source)


#2

This has now been resolved. Please see Github Issue #45 for more details. You should now be able to checkout the latest version (v.2.2.2)