soot-oss / soot

Soot - A Java optimization framework
GNU Lesser General Public License v2.1
2.84k stars 708 forks source link

Disallow null in QueueReader to handle concurrency correctly #2041

Closed MarcMil closed 6 months ago

MarcMil commented 6 months ago

Before that, it could happen that the QueueReader's hasNext method is called, and then the corresponding element gets invalidated by another thread. In that case, the next method throw a NoSuchElement exce> Instead (and conforming to to the JavaDoc), we allow null to be returned in these cases. This means that ChunkedQueues may not contain actual nulls anymore.