Yes it is for fooling checkstyle/findbugs. 
This code will run only if there is a split-brain.
The bound-size of the Queue is Integer.MAX_VALUE.
Even if there are lots of JoinMessage in the queue, we only poll the first one and ignore the others