Use the internal copy of preconditions

This commit is contained in:
Jesse Wilson 2011-03-29 21:13:31 +00:00
parent 454f58a7b1
commit 9bcb0c0b6b

View File

@ -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);
}
}
}