remove errorObjectType from java okhttp-gson (#12345)

This commit is contained in:
William Cheng 2022-05-13 14:30:17 +08:00 committed by GitHub
parent bc71ed9cbb
commit 29323f38a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 21 deletions

View File

@ -333,7 +333,6 @@ public class {{classname}} {
return localVarApiClient.executeStream(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType()));
e.setErrorObjectType(new GenericType<{{{errorObjectType}}}>(){});
throw e;
}
{{/errorObjectType}}
@ -355,7 +354,6 @@ public class {{classname}} {
return localVarApiClient.execute(localVarCall, localVarReturnType);
} catch (ApiException e) {
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType()));
e.setErrorObjectType(new GenericType<{{{errorObjectType}}}>(){});
throw e;
}
{{/errorObjectType}}

View File

@ -22,7 +22,6 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us
private String responseBody = null;
{{#errorObjectType}}
private {{{errorObjectType}}} errorObject = null;
private GenericType errorObjectType = null;
{{/errorObjectType}}
/**
@ -174,24 +173,6 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us
}
{{#errorObjectType}}
/**
* Get the error object type.
*
* @return Error object type
*/
public GenericType getErrorObjectType() {
return errorObjectType;
}
/**
* Set the error object type.
*
* @param errorObjectType object type
*/
public void setErrorObjectType(GenericType errorObjectType) {
this.errorObjectType = errorObjectType;
}
/**
* Get the error object.
*