Skip to content

Commit 730a949

Browse files
refactor: remove unused no-arg constructor and replace String.format with concatenation
1 parent c29d9e3 commit 730a949

1 file changed

Lines changed: 2 additions & 9 deletions

File tree

sdk-platform-java/gax-java/gax/src/main/java/com/google/api/gax/batching/FlowController.java

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
public class FlowController {
4343
/** Base exception that signals a flow control state. */
4444
public abstract static class FlowControlException extends Exception {
45-
private FlowControlException() {}
46-
4745
private FlowControlException(String message) {
4846
super(message);
4947
}
@@ -72,10 +70,7 @@ public static final class MaxOutstandingElementCountReachedException
7270
private final long currentMaxElementCount;
7371

7472
public MaxOutstandingElementCountReachedException(long currentMaxElementCount) {
75-
super(
76-
String.format(
77-
"The maximum number of batch elements: %d has been reached.",
78-
currentMaxElementCount));
73+
super("The maximum number of batch elements: " + currentMaxElementCount + " has been reached.");
7974
this.currentMaxElementCount = currentMaxElementCount;
8075
}
8176

@@ -93,9 +88,7 @@ public static final class MaxOutstandingRequestBytesReachedException
9388
private final long currentMaxBytes;
9489

9590
public MaxOutstandingRequestBytesReachedException(long currentMaxBytes) {
96-
super(
97-
String.format(
98-
"The maximum number of batch bytes: %d has been reached.", currentMaxBytes));
91+
super("The maximum number of batch bytes: " + currentMaxBytes + " has been reached.");
9992
this.currentMaxBytes = currentMaxBytes;
10093
}
10194

0 commit comments

Comments
 (0)