diff --git a/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java b/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java index 7a7dc70b8d..83f26e8f3d 100644 --- a/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java +++ b/gson/src/main/java/com/google/gson/internal/ConstructorConstructor.java @@ -270,15 +270,13 @@ private static ObjectConstructor newDefaultConstructor( // Note: InstantiationException should be impossible because check at start of method made // sure that class is not abstract catch (InstantiationException e) { - throw new RuntimeException( + throw new JsonIOException( "Failed to invoke constructor '" + ReflectionHelper.constructorToString(constructor) + "' with no args", e); } catch (InvocationTargetException e) { - // TODO: don't wrap if cause is unchecked? - // TODO: JsonParseException ? - throw new RuntimeException( + throw new JsonIOException( "Failed to invoke constructor '" + ReflectionHelper.constructorToString(constructor) + "' with no args",