enabled GsonBuilder.registerTypeHierarchyAdapter since head is now for Gson 1.7

This commit is contained in:
Inderjeet Singh 2010-11-25 00:16:06 +00:00
parent e061d0e563
commit 6818edecf9

View File

@ -431,7 +431,7 @@ public final class GsonBuilder {
* @return a reference to this {@code GsonBuilder} object to fulfill the "Builder" pattern
* @since 1.7
*/
GsonBuilder registerTypeHierarchyAdapter(Class<?> baseType, Object typeAdapter) {
public GsonBuilder registerTypeHierarchyAdapter(Class<?> baseType, Object typeAdapter) {
Preconditions.checkArgument(typeAdapter instanceof JsonSerializer<?>
|| typeAdapter instanceof JsonDeserializer<?> || typeAdapter instanceof InstanceCreator<?>);
if (typeAdapter instanceof InstanceCreator<?>) {