Skip to content

Commit 8c4f245

Browse files
committed
More code review updates
1 parent f76cbc0 commit 8c4f245

File tree

1 file changed

+0
-22
lines changed

1 file changed

+0
-22
lines changed

google-cloud-spanner/src/main/java/com/google/cloud/spanner/XGoogSpannerRequestId.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -159,26 +159,4 @@ public XGoogSpannerRequestId nextRequestId(long channelId, int attempt) {
159159
return XGoogSpannerRequestId.of(1, 1, 1, 0);
160160
}
161161
}
162-
163-
static void assertMonotonicityOfIds(String prefix, List<XGoogSpannerRequestId> reqIds) {
164-
int size = reqIds.size();
165-
166-
List<String> violations = new ArrayList<>();
167-
for (int i = 1; i < size; i++) {
168-
XGoogSpannerRequestId prev = reqIds.get(i - 1);
169-
XGoogSpannerRequestId curr = reqIds.get(i);
170-
if (prev.isGreaterThan(curr)) {
171-
violations.add(String.format("#%d(%s) > #%d(%s)", i - 1, prev, i, curr));
172-
}
173-
}
174-
175-
if (violations.isEmpty()) {
176-
return;
177-
}
178-
179-
throw new IllegalStateException(
180-
prefix
181-
+ " monotonicity violation:"
182-
+ String.join("\n\t", violations.toArray(new String[0])));
183-
}
184162
}

0 commit comments

Comments
 (0)