Skip to content

Commit 861a318

Browse files
committed
PR comment
1 parent 2b8154d commit 861a318

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/spi/v1/SubscriberImplTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,8 @@ public void replyNextOutstandingMessage() {
145145

146146
public void replyAllOutstandingMessage() {
147147
Preconditions.checkState(explicitAckReplies);
148-
for (; ; ) {
149-
SettableFuture<AckReply> reply = outstandingMessageReplies.poll();
150-
if (reply == null) {
151-
return;
152-
}
148+
SettableFuture<AckReply> reply;
149+
while ((reply = outstandingMessageReplies.poll()) != null) {
153150
replyTo(reply);
154151
}
155152
}

0 commit comments

Comments
 (0)