This cannot be on one line.  If you look at the code below (the finally block: lines 77-79)  you will see that if we don't assign the result of readMessagesFromShard to the messages variable we will always increment the empty partition count which would be wrong :(