File tree Expand file tree Collapse file tree
trunk/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11---
2- refs/heads/master: eb693bdf8ffe69b548efe91cb9e8a027898dfb19
2+ refs/heads/master: 0d82897a5bef7183c13e94065e50e11cc08e6071
33refs/heads/travis: dae77e558b884bc1b165155482d76c8e40b0fca4
44refs/heads/gh-pages: 229631582f8957646f81e92ae5a326504f48ee5b
55refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
Original file line number Diff line number Diff line change @@ -98,10 +98,7 @@ private static class ExpirationInfo implements Comparable<ExpirationInfo> {
9898
9999 void extendExpiration () {
100100 expiration = new Instant (clock .millis ()).plus (Duration .standardSeconds (nextExtensionSeconds ));
101- nextExtensionSeconds = 2 * nextExtensionSeconds ;
102- if (nextExtensionSeconds > MAX_ACK_DEADLINE_EXTENSION_SECS ) {
103- nextExtensionSeconds = MAX_ACK_DEADLINE_EXTENSION_SECS ;
104- }
101+ nextExtensionSeconds = Math .min (2 * nextExtensionSeconds , MAX_ACK_DEADLINE_EXTENSION_SECS );
105102 }
106103
107104 @ Override
Original file line number Diff line number Diff line change @@ -184,10 +184,7 @@ void sendAckOperations(
184184 }
185185 }
186186
187- List <List <String >> ackChunks = Lists .partition (acksToSend , MAX_PER_REQUEST_CHANGES );
188- Iterator <List <String >> ackChunksIt = ackChunks .iterator ();
189- while (ackChunksIt .hasNext ()) {
190- List <String > ackChunk = ackChunksIt .next ();
187+ for (List <String > ackChunk : Lists .partition (acksToSend , MAX_PER_REQUEST_CHANGES )) {
191188 stub .withDeadlineAfter (DEFAULT_TIMEOUT .getMillis (), TimeUnit .MILLISECONDS )
192189 .acknowledge (
193190 AcknowledgeRequest .newBuilder ()
You can’t perform that action at this time.
0 commit comments