BlockingQueue and Mismatched query and update of collection

Using drainTo() is a valid way to "read" the elements of a BlockingQueue,
but the "Mismatched query and update of collection" inspection marks this
as a collection that is updated by never queried. For example:

BlockingQueue myQueue = new LinkedBlockingQueue();
List myList = new ArrayList(100);
myQueue.drainTo(myList, 100);

The auditQueue will be marked as updated by never queried.


Please sign in to leave a comment.