Skip to content

Commit

Permalink
add the checks back
Browse files Browse the repository at this point in the history
  • Loading branch information
mutianf committed Jul 11, 2023
1 parent aad796d commit 722d4c5
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ public BulkMutation add(@Nonnull ByteString rowKey, @Nonnull Mutation mutation)
long mutationCount = mutation.getMutations().size();
Preconditions.checkArgument(
mutationCountSum + mutationCount <= MAX_MUTATION,
String.format("Too many mutations, got %s, limit is %s", mutationCountSum, MAX_MUTATION));
String.format(
"Too many mutations, got %s, limit is %s",
mutationCountSum + mutationCount, MAX_MUTATION));
this.mutationCountSum += mutationCount;

builder.addEntries(
Expand All @@ -106,7 +108,6 @@ public BulkMutation add(@Nonnull ByteString rowKey, @Nonnull Mutation mutation)
*/
public BulkMutation add(@Nonnull RowMutationEntry entry) {
Preconditions.checkNotNull(entry, "Row mutation entry can't be null");

builder.addEntries(entry.toProto());
return this;
}
Expand Down

0 comments on commit 722d4c5

Please sign in to comment.