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();
myQueue.add(foo);
List myList = new ArrayList(100);
myQueue.drainTo(myList, 100);

The auditQueue will be marked as updated by never queried.

--Mike


2 comments
Comment actions Permalink

Please submit a request to JIRA and I will fix this as soon as possible.

Bas

0

Please sign in to leave a comment.