Skip to content

Commit 8cf7a2b

Browse files
committed
make codacy less angry
1 parent de8e6d2 commit 8cf7a2b

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/Publisher.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -104,16 +104,6 @@
104104
* </code></pre>
105105
*/
106106
public class Publisher {
107-
/** The maximum number of messages in one request. Defined by the API. */
108-
public static long getApiMaxRequestElementCount() {
109-
return 1000L;
110-
}
111-
112-
/** The maximum size of one request. Defined by the API. */
113-
public static long getApiMaxRequestBytes() {
114-
return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
115-
}
116-
117107
private static final Logger logger = Logger.getLogger(Publisher.class.getName());
118108

119109
private final TopicName topicName;
@@ -142,6 +132,16 @@ public static long getApiMaxRequestBytes() {
142132
private final MessageWaiter messagesWaiter;
143133
private ScheduledFuture<?> currentAlarmFuture;
144134

135+
/** The maximum number of messages in one request. Defined by the API. */
136+
public static long getApiMaxRequestElementCount() {
137+
return 1000L;
138+
}
139+
140+
/** The maximum size of one request. Defined by the API. */
141+
public static long getApiMaxRequestBytes() {
142+
return 10L * 1000L * 1000L; // 10 megabytes (https://en.wikipedia.org/wiki/Megabyte)
143+
}
144+
145145
private Publisher(Builder builder) throws IOException {
146146
topicName = builder.topicName;
147147
cachedTopicNameString = topicName.toString();
@@ -574,7 +574,7 @@ public long nextLong(long least, long bound) {
574574

575575
// Client-side flow control options
576576
FlowControlSettings flowControlSettings = FlowControlSettings.getDefaultInstance();
577-
boolean failOnFlowControlLimits = false;
577+
boolean failOnFlowControlLimits;
578578

579579
RetrySettings retrySettings = DEFAULT_RETRY_SETTINGS;
580580
LongRandom longRandom = DEFAULT_LONG_RANDOM;

google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/spi/v1/StreamingSubscriberConnection.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ public void sendAckOperations(
222222
modifyAckDeadlineChunks.iterator();
223223

224224
while (ackChunksIt.hasNext() || modifyAckDeadlineChunksIt.hasNext()) {
225-
com.google.pubsub.v1.StreamingPullRequest.Builder requestBuilder =
225+
StreamingPullRequest.Builder requestBuilder =
226226
StreamingPullRequest.newBuilder();
227227
if (modifyAckDeadlineChunksIt.hasNext()) {
228228
List<PendingModifyAckDeadline> modAckChunk = modifyAckDeadlineChunksIt.next();

0 commit comments

Comments
 (0)