mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 10:26:13 +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) {
|
if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) {
|
||||||
return null;
|
return null;
|
||||||
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||||
if (returnType == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return responseEntity.getBody();
|
return responseEntity.getBody();
|
||||||
} else {
|
} else {
|
||||||
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
// 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) {
|
if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) {
|
||||||
return null;
|
return null;
|
||||||
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||||
if (returnType == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return responseEntity.getBody();
|
return responseEntity.getBody();
|
||||||
} else {
|
} else {
|
||||||
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
// 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) {
|
if (responseEntity.getStatusCode() == HttpStatus.NO_CONTENT) {
|
||||||
return null;
|
return null;
|
||||||
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
} else if (responseEntity.getStatusCode().is2xxSuccessful()) {
|
||||||
if (returnType == null) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return responseEntity.getBody();
|
return responseEntity.getBody();
|
||||||
} else {
|
} else {
|
||||||
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
// The error handler built into the RestTemplate should handle 400 and 500 series errors.
|
||||||
|
|||||||
Reference in New Issue
Block a user