Remove unnecessary string building
package com.scalar.db.io;
-import static com.google.common.base.Preconditions.checkArgument;
-
import com.google.common.base.MoreObjects;
import com.google.common.collect.ComparisonChain;
import java.util.Objects;
@@ -33,9 +31,9 @@ public class BigIntColumn implements Column<Long> {
private BigIntColumn(String name, long value, boolean hasNullValue) {
this.name = Objects.requireNonNull(name);
- checkArgument(
- value >= MIN_VALUE && value <= MAX_VALUE,
- "Out of range column value for BigInt. value: " + value);
+ if (value < MIN_VALUE || value > MAX_VALUE) {
+ throw new IllegalArgumentException("Out of range column value for BigInt. value: " + value);
+ }
this.value = value;
this.hasNullValue = hasNullValue;
}
