Use the internal copy of preconditions
This commit is contained in:
parent
454f58a7b1
commit
9bcb0c0b6b
@ -16,6 +16,8 @@
|
||||
|
||||
package com.google.gson.internal;
|
||||
|
||||
import static com.google.gson.internal.Preconditions.checkArgument;
|
||||
import static com.google.gson.internal.Preconditions.checkNotNull;
|
||||
import java.io.Serializable;
|
||||
import java.lang.reflect.Array;
|
||||
import java.lang.reflect.GenericArrayType;
|
||||
@ -584,14 +586,4 @@ public final class Types {
|
||||
|
||||
private static final long serialVersionUID = 0;
|
||||
}
|
||||
|
||||
private static void checkNotNull(Object obj) {
|
||||
checkArgument(obj != null);
|
||||
}
|
||||
|
||||
private static void checkArgument(boolean condition) {
|
||||
if (!condition) {
|
||||
throw new IllegalArgumentException("condition failed: " + condition);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user