Skip to content

Commit cd1f75e

Browse files
SerhiiKobezaCapgeminiserhii.kobeza
and
serhii.kobeza
authored
payloadFromResponse() will return null if callBack type == Void because GsonConverter cannot work with Void type directly and throws JsonIOException (#119)
Co-authored-by: serhii.kobeza <[email protected]>
1 parent ac37e29 commit cd1f75e

File tree

1 file changed

+1
-0
lines changed
  • guardian/src/main/java/com/auth0/android/guardian/sdk/networking

1 file changed

+1
-0
lines changed

guardian/src/main/java/com/auth0/android/guardian/sdk/networking/Request.java

+1
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ private Call buildCall() {
175175
private T payloadFromResponse(Response response) throws GuardianException {
176176
try {
177177
final Reader reader = response.body().charStream();
178+
if (typeOfT == Void.class) return null;
178179
return converter.parse(typeOfT, reader);
179180
} catch (Exception e) {
180181
throw new GuardianException("Error parsing server response", e);

0 commit comments

Comments
 (0)