Skip to content

Commit

Permalink
make codacy less angry
Browse files Browse the repository at this point in the history
  • Loading branch information
pongad committed Feb 7, 2017
1 parent de8e6d2 commit 8cf7a2b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -104,16 +104,6 @@
* </code></pre>
*/
public class Publisher {
/** The maximum number of messages in one request. Defined by the API. */
public static long getApiMaxRequestElementCount() {
return 1000L;
}

/** The maximum size of one request. Defined by the API. */
public static long getApiMaxRequestBytes() {
return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
}

private static final Logger logger = Logger.getLogger(Publisher.class.getName());

private final TopicName topicName;
Expand Down Expand Up @@ -142,6 +132,16 @@ public static long getApiMaxRequestBytes() {
private final MessageWaiter messagesWaiter;
private ScheduledFuture<?> currentAlarmFuture;

/** The maximum number of messages in one request. Defined by the API. */
public static long getApiMaxRequestElementCount() {
return 1000L;
}

/** The maximum size of one request. Defined by the API. */
public static long getApiMaxRequestBytes() {
return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
}

private Publisher(Builder builder) throws IOException {
topicName = builder.topicName;
cachedTopicNameString = topicName.toString();
Expand Down Expand Up @@ -574,7 +574,7 @@ public long nextLong(long least, long bound) {

// Client-side flow control options
FlowControlSettings flowControlSettings = FlowControlSettings.getDefaultInstance();
boolean failOnFlowControlLimits = false;
boolean failOnFlowControlLimits;

RetrySettings retrySettings = DEFAULT_RETRY_SETTINGS;
LongRandom longRandom = DEFAULT_LONG_RANDOM;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ public void sendAckOperations(
modifyAckDeadlineChunks.iterator();

while (ackChunksIt.hasNext() || modifyAckDeadlineChunksIt.hasNext()) {
com.google.pubsub.v1.StreamingPullRequest.Builder requestBuilder =
StreamingPullRequest.Builder requestBuilder =
StreamingPullRequest.newBuilder();
if (modifyAckDeadlineChunksIt.hasNext()) {
List<PendingModifyAckDeadline> modAckChunk = modifyAckDeadlineChunksIt.next();
Expand Down

0 comments on commit 8cf7a2b

Please # to comment.