mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 05:16:10 +00:00
remove unecessary null check as it cannot be reached due to the Null Pointer Exception (#3480) (#3481)
This commit is contained in:
@@ -619,9 +619,6 @@ public class ApiClient {
|
||||
if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) {
|
||||
return null;
|
||||
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||
if (returnType == null) {
|
||||
return null;
|
||||
}
|
||||
return responseEntity.getBody();
|
||||
} else {
|
||||
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
||||
|
||||
@@ -607,9 +607,6 @@ public class ApiClient {
|
||||
if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) {
|
||||
return null;
|
||||
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||
if (returnType == null) {
|
||||
return null;
|
||||
}
|
||||
return responseEntity.getBody();
|
||||
} else {
|
||||
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
||||
|
||||
@@ -602,9 +602,6 @@ public class ApiClient {
|
||||
if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) {
|
||||
return null;
|
||||
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||
if (returnType == null) {
|
||||
return null;
|
||||
}
|
||||
return responseEntity.getBody();
|
||||
} else {
|
||||
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
||||
|
||||
Reference in New Issue
Block a user